Sender Domain Restriction for Postfix Users
Sender Domain Restriction
for Postfix Users : (outgoing)
Sometimes
we flooded with huge spam mails changing the sender address. So it is very
important for a administrator to stop the option for local users. Through the
following process sender can send mail only from the allowed domain names as from
address domain.
Step 1: Add the following line in "main.cf"
# vim /etc/postfix/main.cf
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/mydomains, reject_unauth_destination
:wq! Save and Exit
Step 2: Create a file in postfix directory.
vim /etc/postfix/mydomains
mydomain1.com OK
mydomain2.com OK
:wq! Save and exit.
mydomain1.com OK
mydomain2.com OK
:wq! Save and exit.
Step 3: postmap the file.
postmap /etc/postfix/mydomains
Step 4: Restart the service.
/etc/init.d/postfix restart
Now
users@mydomain1.com / users@mydomain2.com can send mails using this MX.
Comments
Post a Comment