我已经设置了sendmail来接收几个域的邮件,并为几个子网的价值系统转发邮件。 最近一个特定的仅供内部使用的地址一直在接收大量的垃圾邮件。 我被要求简单地删除任何发往这个地址的邮件,除非这个邮件来源于这个系统将会中继邮件的一台计算机。
我知道我可以用procmail来做到这一点,但我更愿意将它绑定到sendmail,这样不合格的电子邮件将在MTA级别完全被拒绝。 我无法弄清楚如何让sendmail做到这一点(或者甚至可能)。
我已经configuration了以下设置的sendmail:
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')` FEATURE(`blacklist_recipients')
/etc/mail/access
包含:
example.com RELAY connect:192.168.15 OK to:[email protected] REJECT
我通过makemap hash /etc/mail/access.db </etc/mail/access
生成/etc/mail/access.db
makemap hash /etc/mail/access.db </etc/mail/access
。
但是,当我尝试使用该configuration时,即使是本地计算机也会获得550 5.2.1 <[email protected]>... Mailbox disabled for this recipient
尝试发送到内部地址时550 5.2.1 <[email protected]>... Mailbox disabled for this recipient
邮件的550 5.2.1 <[email protected]>... Mailbox disabled for this recipient
。
我可以configurationsendmail做我想做的事情吗?如果是的话,怎么办?
对不起,我不想冒犯你,但这是你的/etc/mail/access.db的确切内容吗?
example.com RELAY connect:192.168.15 OK to:[email protected] REJECT
因为它应该是一个哈希映射。 以上应该是你的/ etc / mail / access的内容。 然后将其编译为映射:makemap hash /etc/mail/access.db </ etc / mail / access