postfix限定特定用户才能发送到别名的解决方法

postfix限定特定用户才能发送到别名的解决方法

建立了[email protected]的一个别名
只允许域内[email protected]才能发送到[email protected]这个别名其他用户都不能发到到这个别名
设置方法如下:
1)在main.cf里定义如下的smtpd_restriction_classes:
# senders
smtpd_restriction_classes = local_only
local_only = check_sender_access hash:/etc/postfix/local_domains, reject
2)将main.cf里的smtpd_sender_restrctions定义为:
smtpd_sender_restrictions =
check_recipient_access hash:/etc/postfix/local_recipient
3)vi /etc/postfix/local_recipient:
[email protected]    local_only
4)vi /etc/postfix/local_domains:
[email protected]    OK
5)为3,4的文件建立hash:

postmap hash:/etc/postfix/local_recipient
postmap hash:/etc/postfix/local_domains

你可能感兴趣的:(职场,用户,postfix,休闲)