如何限制用户在 postfix 中使用不同的伪造发件人电子邮件?

Sou*_*rav 5 postfix centos

我正在管理一个邮件服务器。邮件服务器运行时配置了多个域。问题是经过身份验证的用户可以使用任何发件人电子邮件 ID,我需要阻止它。我怎样才能做到这一点?

示例:带有电子邮件的发件人anything@example.com正在发送带有发件人电子邮件地址的邮件anything@yahoo.com

我需要防止这种情况。

Mat*_*Ife 2

您可以使用配置选项来执行此操作smtpd_sender_login_maps

它要求用户经过 SASL 身份验证。

smtpd_sender_login_maps(默认:空)

Optional lookup table with the SASL login names that own sender
(MAIL FROM) addresses.

Specify zero or more "type:table" lookup tables. With lookups
from indexed files such as DB or DBM, or from networked tables 
such as NIS, LDAP or SQL, the following search operations
are done with a sender address of user@domain:

1) user@domain
    This table lookup is always done and has the highest precedence. 
2) user
    This table lookup is done only when the domain part of 
    the sender address matches $myorigin, $mydestination, 
    $inet_interfaces or $proxy_interfaces. 
3) @domain
    This table lookup is done last and has the lowest precedence. 

In all cases the result of table lookup must be either 
"not found" or a list of SASL login names separated by 
comma and/or whitespace.
Run Code Online (Sandbox Code Playgroud)

然后将配置选项与上述内容一起添加到 smtpd_sender_restrictions 选项中,例如;

smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch
Run Code Online (Sandbox Code Playgroud)