允许发件人在具有LDAP的Postfix服务器上欺骗特定用户

所以我有一个Postfix服务器,用于对LDAP目录进行身份validation。

到目前为止,这个工作很好,但是其中一个邮件地址应该被允许设置另一个发件人地址。

该服务器上的所有用户已被限制发送其login地址,例如[email protected]只允许使用该exakt邮件地址发送。

唯一的[email protected]应该是一个地址, [email protected] ,应该允许发送任何发件人地址(不限于example.com )。

这可能吗?

你可以通过Postfix Restriction Classes来实现。 您可以添加限制类,如下所示。

 #/etc/postfix/main.cf smtpd_restriction_classes = restrictive, permissive restrictive = reject_sender_login_mismatch permissive = permit smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/admin_only smtpd_sender_login_maps = hash:/etc/postfix/sender_maps #/etc/postfix/admin_only /^[email protected]$/ permissive /^/ restrictive #/etc/postfix/sender_maps [email protected] [email protected] 

这里的reject_sender_login_mismatch限制将不适用于[email protected]用户。 上面的configuration使用了smtpd_sender_login_maps hash查找表。 您可以使用LDAP或您select的其他查找表。 希望有所帮助。

Ref: Postfix Docs