公司的邮件服务器收不到外来邮件了,日志里有这样的错误:
554 Service unavailable; Client host [xxx.xxx.xxx.xxx] blocked using relays.ordb.org; ordb.org was shut down on December 18, 2006. Please remove from your mailserver.;
对应main.cf里的配置是这样的:
smtpd_client_restrictions = permit_mynetworks, warn_if_reject reject_rbl_client sbl.spamhaus.org, warn_if_reject reject_rbl_client relays.ordb.org, warn_if_reject reject_rbl_client blackholes.easynet.nl, warn_if_reject reject_rbl_client dnsbl.njabl.org
改成只保留smtpd_client_restrictions = permit_mynetworks, 又有新信息出现:
postfix/smtpd[16212]: warning: problem talking to server 127.0.0.1:60000: Connection timed out
127.0.0.1:60000是postgrey工作的端口,用ps和netstat 发现postgrey进程还在,但top命令发现它占用了99%的CPU,而且用/etc/init.d/postgrey stop停不掉,只好kill掉,并改postfix里相应的设置,去掉postgrey检查:
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks,permit_sasl_authenticated, reject_non_fqdn_recipient,reject_unauth_destination, check_policy_service inet:127.0.0.1:60000,permit
重启postfix,邮件可以收到了。再恢复smtpd_client_restrictions的配置,去掉relays.ordb.org检查,邮件可以收到。顺便搞清楚了warn_if_reject的含义:有它在时并不真正的拒绝邮件。
postgrey的问题还没找到解决办法,不知道为什么会hang在那里,暂时不用它了。
==== 2008-05-14 ====
补充: 将Berkeley DB由原来的4.3升级到4.4以后,postgrey正常了。
搜索到的相关信息:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=441069
https://bugs.edge.launchpad.net/ubuntu/gutsy/+source/db4.4/+bug/153996