我们希望授予我们networking的某些特定服务器发送邮件而不进行身份validation。 我知道check_sender_access和check_recipient_access都可以testing发件人( MAIL FROM )或收件人( RCPT TO )。
为了防止大量使用smtp_restriction_classes我正在寻找一种方法来一次执行这样的查找。 即
# /etc/postfix/check_noauth_servers root@bi-server [email protected] root@bi-server [email protected] user@reporting [email protected]
是否有解决scheme或访问限制,可以做这样的查找?
你似乎在问两个无关的问题。
首先,
我们想授予我们networking的某些特定服务器发送邮件而无需validation。
通过在permit_sasl_authenticated前面放置一个check_client_access可以轻松解决这个问题:
smtpd_recipient_restrictions = check_client_access hash:/etc/postfix/no-auth, permit_sasl_authenticated, reject_unauth_destination
并在/etc/postfix/no-auth :
your.server.name.or.ip OK
这正是smtpd_restriction_classes的用途:
smtpd_restriction_classes = noauth noauth = check_recipient_access hash:/etc/postfix/allowed_recipients smtpd_recipient_restrictions = permit_sasl_authenticated, check_sender_access hash:/etc/postfix/allowed_senders, reject_unauth_destination
并在/ etc / postfix / allowed_senders中:
[email protected] noauth [email protected] noauth
并在/ etc / postfix / allowed_recipients中:
[email protected] OK [email protected] OK
您申请访问检查的顺序取决于您。
如果您需要更复杂的规则(例如,将发件人和收件人组合在一张支票中),请查看postfwd (Postfix FireWall守护程序)。
这允许复杂的规则la iptables,作为策略服务器应用(check_policy_service); 策略服务的优点是可以一次访问所有数据前参数(客户端,helo,发送者,接收者)。