我们收到很多发送给(随机)不存在的用户的垃圾邮件。 这导致后缀生成“未知用户”反弹给假发件人。
作为一种解决方法,我使用全面的方式将任何邮件redirect到我自己,并在local_part中手动转发邮件。
我希望postfix将垃圾邮件放置到不存在的用户,并且只有当他们的垃圾邮件分数低于阈值时才反弹。 这样,试图向不存在的用户发送火腿的人将得到通知,并且将会有较less的后向散射。
这里是日志文件
Sep 11 07:03:31 srv postfix/smtpd[27382]: connect from mailin.example.com[10.13.185.194] Sep 11 07:03:31 srv postfix/smtpd[27382]: 563393847D: client=mailin.example.com[10.13.185.194] Sep 11 07:03:31 srv postfix/cleanup[27386]: 563393847D: message-id=<[email protected]> Sep 11 07:03:31 srv postfix/qmgr[1771]: 563393847D: from=<[email protected]>, size=5341, nrcpt=1 (queue active) Sep 11 07:03:31 srv postfix/smtpd[27382]: disconnect from mailin.example.com[10.13.185.194] Sep 11 07:03:33 srv postfix/pickup[26067]: C53A53851C: uid=115 from=<[email protected]> Sep 11 07:03:33 srv postfix/cleanup[27386]: C53A53851C: message-id=<[email protected]> Sep 11 07:03:33 srv postfix/pipe[27387]: 563393847D: to=<[email protected]>, relay=spamassassin, delay=2.5, delays=0.05/0.01/0/2.4, dsn=2.0.0, status=sent (delivered via spamassassin service) Sep 11 07:03:33 srv postfix/qmgr[1771]: 563393847D: removed Sep 11 07:03:33 srv postfix/qmgr[1771]: C53A53851C: from=<[email protected]>, size=3784, nrcpt=1 (queue active) Sep 11 07:03:33 srv postfix/local[27392]: C53A53851C: to=<[email protected]>, relay=local, delay=0.25, delays=0.11/0.01/0/0.13, dsn=5.1.1, status=bounced (unknown user: "kn") Sep 11 07:03:33 srv postfix/cleanup[27386]: F2879384E6: message-id=<[email protected]> Sep 11 07:03:34 srv postfix/bounce[27393]: C53A53851C: sender non-delivery notification: F2879384E6 Sep 11 07:03:34 srv postfix/qmgr[1771]: F2879384E6: from=<>, size=5665, nrcpt=1 (queue active) Sep 11 07:03:34 srv postfix/qmgr[1771]: C53A53851C: removed Sep 11 07:03:34 srv postfix/smtp[27394]: F2879384E6: to=<[email protected]>, relay=mailout.example.com[10.13.60.4]:25, delay=0.08, delays=0.04/0.01/0.01/0.02, dsn=2.0.0, status=sent (250 OK id=1R2e4j-0001L0-QU) Sep 11 07:03:34 srv postfix/qmgr[1771]: F2879384E6: removed
不幸的是,服务器在看到消息之前检查现有的收件人(对信封收件人)。 无法检查邮件是否为垃圾邮件。
在这个检查之前唯一的事情是“服务器helo”和“信封来自”; 您可以尝试过滤( SPF和rDNS查找会立刻引起注意)。 您也可以使用像Gralist的 RFC-Exploit反垃圾邮件检查。
你的设置真的坏了!
不要激活Catch-All。 然后Postfix必须知道哪些地址是有效的,哪些不是。 然后在发送服务器试图发送邮件时,Postfix将自动拒绝任何未知收件人(未知用户)的邮件。 在这种情况下,Postfix 从不发送退回消息。 这种行为是默认启用的,当你为“未知用户”生成反弹时,你确实一定会搞砸了configuration。