OpenSUSE Network :: Setting Up Default Postfix Sender / Using Relay For MTA
Dec 17, 2010
I have setup up an Opensuse as a simple we/application server.It handles requests for various things and will need to send out email on occasion for things like password reset requests, information / warnings etc. etc.This is a standard OPenSuse 11.x install with defaults so it comes with Postfix as the mta.I do not want a mail server I just want to send out via my clients mail server which is hosted exchange rackspace, which simply requires SMTP auth to do so.What would be the proper way to do this so ALL e-mail send from this machine, regardless of account like WWWRun or when logged in and sending from the command line has the same sender all the time.
For about a week now I've been seeing mass attempts to relay through postfix and login to dovecot from the same 2 addresses, none are successful due to how postfix/dovecot are configured and I wouldn't be overly worried but my isp have picked up on it and are nagging at me
What ways do people go about just dropping connection attempts from offending addresses/ranges when stuff like that happens? An ideal thing would be something that detects repeated failed attempts from a host or range and subsequently ignore/ban them, perhaps for a specified length of time, something along the lines of denyhosts and fail2ban for ssh would be great Don't know if there's anything out there or just a plain tried and trusted method anyone might use for stuff like this, if not a hint on the most appropriate way to go about it 'manually' would do
I would like to setup postfix to act as a relay for the outgoing mails of a couple of servers each serving it's own domain.The mails we are talking about are standard administrative emails like user registration, password reset request. The volume of those mails will naturally grow as the site grows. Which for me poses the problem that depending on the growth of the site you will sooner or later hit the quotas imposed by (my otherwise preferred) providers like GMail or smtp.com.
So what I need is a mail relay that will only accept mails from authenticated clients from hosts in its access list and relay their mail without restrictions. Is that possible with postfix? What has to be changed in the config and what are the pitfalls?
I was never confident with postfix, but used it for several years now on my own server. I even noted the exact config used. But my old server crashed and I have to build fast a news one and I don't receive mails anymore. Here is the log message when trying to send to me from gmail:
Jun 4 08:06:34 ks3095514 postfix/smtpd[4008]: connect from mail-pw0-f50.google.com[209.85.160.50] Jun 4 08:06:34 ks3095514 postfix/smtpd[4008]: NOQUEUE: reject: RCPT from mail-pw0-f50.google.com[209.85.160.50]: 554 5.7.1 <jdd@dodin.net>: Relay access denied; from=<lesrevesdeness@gmail.com> to=<jdd@dodin.net> proto=ESMTP helo=<mail-pw0-f50.google.com> Jun 4 08:06:35 ks3095514 postfix/smtpd[4008]: disconnect from mail-pw0-f50.google.com[209.85.160.50]
The main.cf file is the openSUSE default one (see below). Part of my problems seems to come from the reverse. I *could once* receive one test messsage to " ks3095514.kimsufi.com" (the default reverse/domain name) (below, commented out), but not for my own domain (dodin.org). Most of the time the only necessary lines are mydomain, myhostname, myorigin and mydestination, but this don't work anymore. New defaults??. local (from and to the server) mail works, root can send to jdd and I read it from home.
My issue is that i'm trying to send emails with postfix and gmail as the mail relay,i'm trying to send emails to my self by sendmail -bv user@gmail.com
In the logs, i can understand that it been delivered to the destination, taken from: /var/log/mail.log: Apr 30 00:05:23 moni postfix/pickup[10490]: 9C7552170C: uid=0 from=<root> Apr 30 00:05:23 moni postfix/cleanup[10495]: 9C7552170C: message-id=<20110429210523.9C7552170C@moni.localdomain> Apr 30 00:05:23 moni postfix/qmgr[10491]: 9C7552170C: from=<root@moni.localdomain>, size=283, nrcpt=1 (queue active) code....
When login in my gmail account i can't see nothing under the sent / inbox / spam folder.
it's seems like the mail are been sent.. but nothing is happening.
In 11.3, if in "/etc/sysconfig/network/ifcfg-eth0" i set DHCLIENT_SET_DEFAULT_ROUTE="no" this seems to have no effect. If i start my box, the routing table has the "default route"-entry offered by a remote DHCP-Server. More Info: My Susebox has eth0 and eth1 and both network devices should use DHCP4. But from DHCP-offer on eth0 i want to use
I want a mail server that can relay mails to the internet using GMail and fetch the mails of different accounts into the mail server and distribute them to their respective users. I am using Postfix, Fetchmail and Dovecot. I have a PC with 3 users.I use the PC having Ubuntu 9.04 and share the internet. We all send mail and retrieve mail. We do use Evolution and Mutt sometimes. We want to send our mails with our email_ids without even logging in.
Hostname mail.myhomepc.com Domain myhomepc.com
[code]....
I have created my custom certificate using SSL. I've created the Postfix's main.cf file following a tutorial on the net. Currently mails are going fine, but with our local email_ids. I want Postfix to rewrite our local email_ids with the equivalent email_id on the net.
I need to have a postfix server to rewrite the sender's address. For example, if the sender is: [URL], then the recipient would receive all emails from [URL] as [URL]. I tried using the generic file and created a table out of it, but this did not work:
postmap /etc/postfix/generic -rw-r--r-- 1 root root 9977 Dec 27 15:24 generic -rw-r--r-- 1 root root 12288 Dec 27 15:25 generic.db
I added this line to the generic text file:
[code]....
I am running two boxes with postfix 2.3.3. and 2.1.1 respectively. Both need this configuration. I also added this line:
smtp_generic_maps = hash:/etc/postfix/generic
on the main.cf file. However, this did not work. The one running postfix 2.3.3 is on Centos 5.5, the other one is on SuSe Enterprise 9.
I am trying unsuccessfully to have a more permanent fix so I can receive emails from an invalid domain. The message is 'Sender address rejected: Domain not found' in the postfix mail logs. Fair enough, there may be an A record or MX record problem there, but there is nothing I can do about this with the Sender at present. Mail *will* come through from the invalid domain if I delete
Code:
reject_unknown_sender_domain
from the list at: smtpd_recipient_restrictions in /etc/postfix/main.cf (see coded area below for full list). I have added the Domain in question as an 'OK', both by name and by IP address, to: /etc/postfix/recipient_access, then used postmap to successfully create the database which appears as: recipient_access.db
ie recipient_access (not recipient_access.db) has contents: invalid-domain-name.com OK ; the space betw is a tab space 123.456.789.012OK ; the space betw is a tab space I suspect the failure is something to do with postmap and the recipient_access.db database file created by postmap, but just cannot work this out. Running: postconf -d indicates that the hash format is the default database format
As indicated below,
Code:
check_recipient_access hash:/etc/postfix/recipient_access is listed up front in smtpd_recipient_restrictions Postfix was restarted on all occassions Everything above was done as root and permissions on the .db files are the same as other files in /etc/postfix
block incoming email within either postfix or spamassassin when the sender equals the recipient. The manner in which our mail infrastructure is set up would preclude this from happening. Granted, we do have outside vendors that spoof our domain so we have to allow emails in with our domain as the sender/from. The vendors do not, however, utilize the same sender/recipient when sending emails.
I have an email server configured with postfix, dovecot, saslauthd and squirrelmail. It works great. In fact I'd even say it works too well: in squirrelmail, I can configure any sender address and my server will accept it. Message will be sent, wether the sender's address is [URL] or [URL]. Is there any way of limiting it in such way that only [URL] is accepted as sender's address?
Im trying to get postfix to filter my outgoing mail and basically drop everything that is not in my hash table.
So far I managed to get this going
Code:
Code:
Unfortunately those rules also apply to incoming messages. My goal is to disallow users on my host to change their "MAIL FROM" to anything they like and restrict them to domains I specify. I'm aware that the local part still is variable and a user of domain "foo.com" could use a email of domain "bar.com", but still some of my troubles would be solved if I get this running.
This seems like a relatively simple question, but I haven't been able to figure it out from the documentation after a couple of hours of searching. I'm running postfix on my mail server, and the vast majority of my spam has the sender address spoofed to match the recipient address. I've got spamassassin up and running, and very little gets through that, so it's not a serious problem, but if possible I would like to be able to reject the mail before it arrives to reduce the system load.
Mail is sent locally via webmail, relaying is denied, so the only way that mail should be sent from the domain is via a connection from localhost. The basic idea I'm thinking of is if the MAIL FROM sender claims to be an address at the receiving domain, but is connected from a remote IP, the mail should be rejected.
I'm looking for a way to redirect e-mail with postfix based on sender AND recipient. What I want: Let's say I have 3 users:
[code]....
and an external address, let`s call it [URL] sends e-mails every day to andy, mark and john Now, MARK and JOHN, need the e-mail sent by [URL], but TOM doesn't need it. Is there a way to redirect ONLY the e-mail sent to TOM from [URL], to some other address, let`s say [URL] without affecting the e-mail received by MARK and JOHN? Unfortunately using SENDER ACCESS redirects ALL e-mail from [URL]
I'm testing my mail server, and sending email works fine. However, when I tried to send emails to my server from gmail, I get this log:
Code: Aug 8 14:18:17 anbient postfix/smtpd[14228]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual Aug 8 14:18:17 anbient postfix/smtpd[14228]: connect from mail-qy0-f169.google.com[209.85.216.169] Aug 8 14:18:17 anbient postfix/smtpd[14228]: F3D4B1DD02C0: client=mail-qy0-f169.google.com[209.85.216.169] Aug 8 14:18:18 anbient postfix/cleanup[9988]: F3D4B1DD02C0: message-id=<4C5EBC96.2030800@gmail.com> Aug 8 14:18:18 anbient postfix/qmgr[9993]: F3D4B1DD02C0: from=<felipefidelix@gmail.com>, size=1982, nrcpt=1 (queue active) Aug 8 14:18:18 anbient postfix/smtp[9995]: connect to net[174.132.240.146]:25: Connection refused Aug 8 14:18:18 anbient postfix/smtp[9995]: F3D4B1DD02C0: to=<fidelix@net>, orig_to=<eu@felipefidelix.com>, relay=none, delay=0.15, delays=0.09/0/0.05/0, dsn=4.4.1, status=deferred (connect to net[174.132.240.146]:25: Connection refused)
And this is strange. 174.132.240.146 seems to be the web address 'net.net'. I am sure this has to be some setting in postfix, cuz its trying to deliver the email to 'fidelix@net', and that cant be right.
Here is my postconf -n output: Code: root@anbient:/var/mail# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes config_directory = /etc/postfix home_mailbox = Maildir/ .....
When attempting to check my postfix install by using telnet to send an email to an address outside my local network, I get a relay access denied error.
This is how I attempted to send an email
Code: telnet my_server 25 helo my_server mail from: me@my_server rcpt to: me@gmail.com
I currently have a postfix / dovecot server running on one ubuntu server with nullmailer relaying webmail on a different server. This is currently working except the mail server is rejecting incorrect addresses which results in the messages being stuck in the nullmailer queue on the webmail server. Is it possible to force postfix to accept and manage all relayed messages from webmail, or is it possible for the nullmailer to manage the bounced messages correctly?
Some mail coming to my postfix server will need to be delivered local and the rest to an internal mail server. The internal mail server is mail.example.com where there is no bob@example.com but there is a sam@example.com. Is it possible to configure postfix to do this?
I just finish install & setup postfix & spamassasin. I can send & received email from my local area network. i already install webmail client & I can send received. When using my pda from outside my network I can received but I just can send email to my domain only. For other domain it's error relay access denied. Here my postfix configuration.
On my opensuse 11.4 box (although I assume the version is irrelevant), I'm trying to figure out how to do something with the mail command. We have multiple smtp relay servers and sometimes I have to test to verify that mail is bouncing off of them successfully. On my laptop, in my main.cf file for postfix, I've got the relay server listed. But to test multiple servers, I have to change the main.cf, restart postfix, send message, and then repeat for each test.
I'm trying to figure out a way to specify the smtp relay on the command line. I've been playing with the -S option which is supposed to allow variables and one of the variables in the man page is 'smtp'. I've tried several different syntaxes but nothing seems to work.
The closest I've come is: mail -S smtp 10.1.0.63 -s "test" user@email.com < main.cf
That syntax doesn't give me an error but it still routes the message off the smtp server listed in main.cf which is not 10.1.0.63.
I've search high and low.. does anyone know how to configure Postfix/Dovecot to use another SMTP server (i.e. smtp.comcast.net) as my ISP blocks port 25?
My postfix is ok with receiving emails but i can send mail to my domain only [URL] When I want to send to other domains i receive this error (in the maillog):
I have a mail server running Postfix and the problem I'm running into is that when trying to send mail, I get a "relay access denied" error.Inside my main.cf, I did not specify 'smtpd_recipient_restrictions' so by default, the variable is:
Code: smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination The 'mynetworks' variable looks like this:
I'm trying to set up my postfix server to relay mail (via a php cms) using Gmail's smtp on my account, but for some reason, Gmail returns an error code that StartTLS must be sent first, my postfix main.cnf file can be found at pastebin, because of this forum's text length I cannot paste my postfix main.cnf file as can be seen I have everything set and configured for Gmail, but postfix (for some unseen reason) can not send StartTLS. [URL].
I'm using Ubuntu Server 10.04 and I can successfully relay mail generated by php scripts through an Exchange server.What I want to do is accept incoming mail from the Internet through postfix and relay it to the Exchange server but I want all mail that is not addressed to ...@mydomain.edu to be discarded.
I'm trying to setup postfix (or exim, I don't mind which), so I can move away my last remaining PC from Windows.I've tinkered with Postfix for good part of a month and I can get it to accept emails using SMTP and post them to a virtual mailbox based on MySQL tables. And it rejects mail addressed to local email addresses that it can't find in the table.
First question (or problem.) I've set up Postfix to relay email it cannot deliver locally such as is the case when you send out an email. My remote host requires authentication. How can I set this up?
Second question: I want to force my clients to use either AUTH, TLS or SSL, and not allow anonymous connections (to prevent an open relay server.) How do I set that up without interfering with the smarthost setting? The smarthost login is not one of my clients, it's a pre-determined login and password that is solely used for the email relaying aspect.