Sendmail:如何拒绝特定加号地址

Sendmail: how to reject a specific plussed address

我在很多邮件列表中,地址为 list+detail@foo.com,其中 detail 特定于列表。我的 MTA 是 sendmail,没有针对这些附加地址的特定 virtusertable 条目。 plussed 地址未经修改就转到 dovecot,然后转到我的邮件客户端,在那里它们被分类。

问题:如果 list+bar@foo.com 开始收到大量垃圾邮件,我该怎么办?我可以在 sendmail 中拒绝这个特定的加号地址吗?我找不到使用 virtusertablealiases 的方法。

您需要类似于下面的 virtusertable 条目

list+bar@foo.com   error:nouser 550 No such user here

virtusrtable 可以使用自定义错误消息拒绝信封收件人

jax@bar.com   error:5.7.0:550 Address invalid

mail to jax@bar.com will also have a RFC 1893 compliant error code 5.7.0.

virtusertable 处理加号地址的简单查找序列

The username from the original address is passed as %1 allowing:

@foo.org  %1@example.com

meaning someone@foo.org will be sent to someone@example.com. Additionally, if the local part consists of "user+detail" then "detail" is passed as %2 and "+detail" is passed as %3 when a match against user+* is attempted, so entries like

old+*@foo.org new+%2@example.com
gen+*@foo.org %2@example.com
+*@foo.org    %1%3@example.com
X++@foo.org   Z%3@example.com
@bar.org  %1%3