一、配置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
四、转换sender_list与recipient_list
postmap hash:/etc/postfix/sender_list
postmap hash:/etc/postfix/recipient_list
五、重新读取postfix配置
postfix reload
【编辑推荐】