restrict outgoing mail with postfix
Hi,
We currently have 2 linux email servers, which we want to merge into one. They are running RHEL5, Dovecot for IMAP/POP, and SMTP i assume is running through Postfix (Sorry, I inherited these and my Linux skills that great!). These are used for internal email only. Both servers are setup so only certain users can send to non-trusted domains (config is the same as this link - http://www.postfix.org/RESTRICTION_CLASS_README.html, bottom of the page). One server works, the other doesn't. I have trolled a lot of forums, but cannot find an answer. I believe it is using postfix, as if i remove the line "permit_mynetworks" from "smtpd_recipient_restrictions" in the main.cf, all email stops working. My assumption is that username/email is not finding a match in the /etc/postfix/restricted_senders file, but i have tried different possibilities with no success. Is there a log file i can check which shows postfix errors or email traces? Any thoughts? I can post some configs if you need them. Thanks in advance. |
Are both servers running different domains? Are they using mysql database or linux users? What is the pop/smtp software running.
Further details will be required before anything can be concluded. Also posting main.cf of both servers may help. Regards, Gorav |
2 Attachment(s)
Hi gorav,
main.cf files are attached for both servers. They are on different domains. The server that isn't working was connected to Active Directory at some point - I'm not sure if it still is or not. The logins are all linux users. Dovecot is used for POP/IMAP. In regards to SMTP, I assume it is using postfix on both servers. As mentioned before, I removed the line "permit_mynetworks" from "smtpd_recipient_restrictions" in the main.cf and all emails were bouncing, which points me to postfix controlling the SMTP. Thanks |
bump.
Can anyone assist with this? or point me in a direction for diagnosis? Thanks |
Error log
What error does it show in /var/log/maillog?
Also, permitting emails for mynetwork is a bad idea as it becomes open relay host which can usually is undesirable. My email id is gorav(at)impactservices(dot)in |
Hi gorav,
The maillog has some detail. Here are the extracts from my test emails: WORKING Sep 27 00:51:08 sendmail postfix/smtpd[15189]: connect from gm716pc1[10.110.12.151] Sep 27 00:51:08 sendmail postfix/smtpd[15189]: NOQUEUE: reject: RCPT from gm716pc1[10.110.12.151]: 554 5.7.1 <innaloo312@*****.biz>: Sender address rejected: Access denied; from=<innaloo312@*****.biz> to=<*****@bigpond.com> proto=SMTP helo=<GM716PC1> Sep 27 00:51:08 sendmail postfix/smtpd[15189]: disconnect from gm716pc1[10.110.12.151] NOT WORKING Sep 26 14:34:52 dovecot postfix/smtpd[7236]: connect from gm716pc1[10.110.12.151] Sep 26 14:34:52 dovecot postfix/smtpd[7236]: CDA6CB50043: client=gm716pc1[10.110.12.151] Sep 26 14:34:52 dovecot postfix/cleanup[7204]: CDA6CB50043: message-id=<665A65D5EA7A40F6BB71E011BDB9EF12@GM716PC1> Sep 26 14:34:52 dovecot postfix/qmgr[30426]: CDA6CB50043: from=<test999@*****.biz>, size=1331, nrcpt=1 (queue active) Sep 26 14:34:52 dovecot postfix/smtpd[7236]: disconnect from gm716pc1[10.110.12.151] Sep 26 14:34:52 dovecot postfix/smtp[7353]: CDA6CB50043: to=<*****@bigpond.com>, relay=exchange.***.local[10.110.1.5]:25, delay=0.15, delays=0.06/0/0/0.09, dsn=2.6.0, status=sent (250 2.6.0 <665A65D5EA7A40F6BB71E011BDB9EF12@GM716PC1> Queued mail for delivery) Sep 26 14:34:52 dovecot postfix/qmgr[30426]: CDA6CB50043: removed Sep 26 14:34:53 dovecot dovecot: IMAP(test999.*****.biz): Effective uid=758, gid=504, home=/home/*****/homes/test999 Sep 26 14:34:53 dovecot dovecot: IMAP(test999.*****.biz): maildir: data=/home/*****/homes/test999/Maildir Sep 26 14:34:53 dovecot dovecot: IMAP(test999.*****.biz): maildir: root=/home/*****/homes/test999/Maildir, index=/home/*****/homes/test999/Maildir, control=, inbox= Sep 26 14:34:53 dovecot dovecot: imap-login: Login: user=<test999.*****.biz>, method=PLAIN, rip=::ffff:10.110.12.151, lip=::ffff:10.110.1.6 Sep 26 14:34:53 dovecot dovecot: IMAP(test999.*****.biz): Disconnected: Logged out Note that I put ***** to blank out some detail. I also found this in the log of the server that isnt working: Sep 26 14:14:24 dovecot postfix/smtpd[6091]: warning: database /etc/postfix/restricted_senders.db is older than source file /etc/postfix/restricted_senders Sep 26 14:14:24 dovecot postfix/smtpd[6091]: warning: database /etc/postfix/local_domains.db is older than source file /etc/postfix/local_domains Is this the cause of the issue? Thanks |
...bump...
Can anyone help at all? |
You may need professional help.
|
All times are GMT -5. The time now is 10:48 AM. |