我收到了来自 Nagios 的有关 Mailqueue 长度的警报电子邮件:
Additional Info: WARN - Mailqueue length is 18 (More than threshold: 10)
在 中mailq
,我看到一些类似这样的消息:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
A7B39BFB01A7 16746 Tue Apr 9 08:54:57 [email protected]
(connect to asdasd.vn[203.119.8.111]: Connection timed out)
[email protected]
的价值smtpd_recipient_restrictions
:
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination,
check_policy_service unix:private/policy,
reject_unknown_recipient_domain,
reject_unverified_recipient
请注意,我已启用reject_unknown_recipient_domain
。
但是让我们看看该域名映射到哪个 IP 地址:
$ nslookup asdasd.vn
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
asdasd.vn canonical name = thongbao.vnnic.vn.
Name: thongbao.vnnic.vn
Address: 203.119.8.111
除了将 203.119.8.111 列入黑名单之外,还有其他方法可以禁用此行为吗?
更新 1
/var/log/maillog
:
Apr 9 15:50:36 mail postfix/qmgr[18585]: 23A66BFB01A0: to=<[email protected]>, relay=none, delay=25004, delays=24983/21/ 0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to asdasd.vn[203.119.8.111]: Connection timed out)
答案1
你可以运行它postfix_header_checks只需设置一行显示 /^To:.*@asdasd.vn/ REJECT,或者您可以根据需要做其他事情。
标题检查的优点在于您可以根据需要添加任意数量的标题检查。