我管理基于 Postfix 的电子邮件服务器,该服务器包含过去和当前电子邮件的副本。一些用户已经离开,但他们的电子邮件历史需要保留和访问。在目前的情况下,发送给那些已经离开的用户的任何电子邮件仍会正常收到。我想阻止发送到这些帐户的任何新电子邮件。我可以看到一种使用 smtpd_restriction_classes 的方法。我是否必须将所有用户都包含在 check_recipient_access 哈希表中,还是可以只包含我想阻止的那些帐户?
smtpd_restriction_classes = restrictive, permissive
restrictive = DEFER
permissive = permit
check_recipient_access = hash:/etc/postfix/recipient_access
/etc/postfix/recipient_access:
joe@example.com restrictive
mary@example.com restrictive
Run Code Online (Sandbox Code Playgroud) postfix ×1