Postfix:转发所有地址以外的所有邮件

我有一个电子邮件[email protected]我在一个转发表中做了以下规则: @city.com [email protected]

这意味着邮件地址( [email protected], [email protected] etc. )与域名city.com我会收到在[email protected] 。 我喜欢它,但我想拒绝打算发送电子邮件[email protected]的邮件

可能吗?

我在Ubuntu 16.04上使用Postfix / Dovecot和MySQL。

除了添加转发表之外,还需要为check_recipient_access添加一个smtpd_recipient_restrictions规则:hash:/ etc / postfix / rejected_destination,然后填写该文件/ etc / postfix / rejected_destination,并在其后运行postmap(以及postfix后重新加载所有变化)

您可以在http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions上查看文档