Pages

Tuesday, October 18, 2011

Sender Access Check in Postfix

I am working with a Debian Linux server and Postfix is using as its MTA. To control unwanted sender access to use that MX please go for the following steps:


Add a line in main.cf file:
vim /etc/postfix/main.cf
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access



create sender_access file and give all the valid users account as following:

vim /etc/postfix/sender_access
user1@example.com      OK
user2@example.com      OK
and more.....


save and exit the file.

Run the following Command:


postmap /etc/postfix/sender_access



restart postfix service.
/etc/init.d/postfix restart



Check the mail log with non-listed user of sender_access file.
tail -f /var/log/mail.log

No comments:

Post a Comment