我怎样才能configuration后缀只允许发送到某个(外部)域?
我已经在使用check_recipient_access。 我的/ etc / postfix / recipients_restrictions的内容:
domain.com OK
我的(当前)configuration:
smtpd_recipient_restrictions = permit_mynetworks, check_recipient_access hash:/etc/postfix/recipients_restrictions, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unauth_destination, reject
我已经尝试切换permit_mynetworks和check_recipient_access。 如果我在recipients_restrictions文件中创build了一个类似“baddomain.com REJECT”的条目,它可以正常工作。 我发现,在这个文件中没有办法为“拒绝”创build通配符(如果我错了,请纠正我)。
我希望这台服务器只发送到几个域的地址,并限制它不发送任何邮件到任何其他域作为安全的问题。
check_mumble_access表永远不会返回REJECT的默认值; fallthrough默认总是DUNNO,这意味着它将检查其余的限制。
您也不希望返回所有您想要允许的域名,因为这不会检查其他限制。
您应该使用SASL和TLS在端口587上设置提交邮件到postfix机器; 这个专门的监听器可以允许通信只能到一个域。
否则,你将不得不为它创build一个restriction_class,这样permit_checks依赖于收件人(域)和发件人(域)。
这是一个非平凡的练习。
/etc/postfix/main.cf: smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/protected_destinations ...the usual stuff... smtpd_restriction_classes = insiders_only insiders_only = check_sender_access hash:/etc/postfix/insiders, reject /etc/postfix/protected_destinations: [email protected] insiders_only [email protected] insiders_only /etc/postfix/insiders: my.domain OK matches my.domain and subdomains another.domain OK matches another.domain and subdomains
从这里采取: http : //vicky2183.wordpress.com/2010/07/09/postfix-per-recipient-sender-restrictions/
几年前我用了这样的设置。 我限制本地收件人发送,并且只接收来自允许的目的地的电子邮件。
我发现我必须删除permit_mynetworks才能拒绝没有在check_recipient_access指定的东西。