限制谁可以发送到电子邮件地址

for*_*rin 6 postfix procmail

我想这样做,只有某些发件人:地址可以发送到运行 Postfix 的 Ubuntu 系统上的电子邮件地址(邮件列表)。

理解手册中的 Postfix 需要很多知识,所以我希望得到一个我可以使用的完整配方。目前这是我所拥有的:

/etc/postfix/main.cf:
smtpd_recipient_restrictions =
  check_recipient_access hash:/etc/postfix/protected_destinations
smtpd_restriction_classes = insiders_only
insiders_only = check_sender_access hash:/etc/postfix/insiders, reject

/etc/postfix/protected_destinations:
protected.list@example.com insiders_only

/etc/postfix/insiders:
allowed.user@example.com OK
another.allowed.user@example.com OK
Run Code Online (Sandbox Code Playgroud)

这给出:

fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Run Code Online (Sandbox Code Playgroud)

我愿意接受任何建议。它不必是 Postfix。它可以是 procmail 或任何其他标准解决方案。

注意:收件人是一个邮件列表,因此在系统帐户上没有用户帐户。因此,任何解决方案都必须在没有帐户的情况下工作。

当前邮件列表实现

/etc/postfix/virtual:
protected.list@example.com user1@example.com, user2.example.com, ...
Run Code Online (Sandbox Code Playgroud)

tri*_*eee 1

您是否已阅读并理解错误消息?你应该有类似的东西

smtpd_recipient_restrictions =
  check_recipient_access hash:/etc/postfix/protected_destinations,
  permit_mynetworks,
  reject_unauth_destination
Run Code Online (Sandbox Code Playgroud)

postconf -d...这是您在此处随机 Debian 盒子上的输出前面的规则。