postfix / dovecotfilter谁可以代表发送邮件

我正在使用postfix + dovecot(imap + pop3)+ mysql我想明确定义可以代表其他人发送电子邮件的用户或组我想这样做:对于所有本地(mysql)authentication用户过滤传出邮件:过滤所有邮件的标题返回path/ X原始的收件人/发件人:字段必须matcheauthentication用户发送它,否则弹回电子邮件

任何想法如何做到这一点?

您可以在smtpd_sender_restrictions中使用smtpd_sender_login_maps和reject_authenticated_sender_login_mismatch来限制login的用户可以使用哪些MAIL FROM地址。 例如:

main.cf:

smtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch 

/等/后缀/ sender_login_maps:

 [email protected] alice [email protected] bob [email protected] charlie [email protected] alice,charlie 

不要忘记运行postmap:

 # postmap /etc/postfix/sender_login_maps