This section
describes how to allow/reject a specific sender or a specific domain.
1. Edit the file
/etc/postfix/main.cf and add the line below.
[root@mailserver ~]#
vim /etc/postfix/main.cf
[root@mailserver ~]#
cat /etc/postfix/main.cf
…
…
# add as Sender and Recipients Restriction
smtpd_sender_restrictions
= check_sender_access hash:/etc/postfix/sender_access
..
[root@mailserver ~]#
2. Create the file
/etc/postfix/sender_access and review the example below.
[root@mailserver ~]#
vim /etc/postfix/sender_access
[root@mailserver ~]#
cat /etc/postfix/sender_access
janedoe@acme.local
REJECT
bugsbunny@acme.com
OK
acme.com
REJECT
[root@mailserver ~]#
3. Create
/etc/postfix/sender_access file to database
[root@mailserver ~]#
postmap /etc/postfix/sender_access
4. Restart Postfix
Mail Service
[root@mailserver ~]#
service postfix restart
No comments:
Post a Comment