Postfix限制郵箱收發(fā)規(guī)則
一、配置postfix
vim /opt/postfix/conf/main.cf
smtpd_restriction_classes=smtp_acl
smtp_acl=check_sender_access hash:/etc/postfix/sender_list,reject
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_list, reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_hostname, reject_non_fqdn_sender, permit
二、配置sender_list
vim /etc/postfix/sender_list
eric@domain.com OK
三、配置recipient_list
vim /etc/postfix/recipient_list
all@domain.com smtp_acl
四、轉(zhuǎn)換sender_list與recipient_list
postmap hash:/etc/postfix/sender_list
postmap hash:/etc/postfix/recipient_list
五、重新讀取postfix配置
postfix reload
【編輯推薦】