情况:
-----------------------------------------------
1。linux 防火墙中允许SMTP
2。/etc/hosts.allow 中有行: all : localhost
/etc/hosts.deny 中有行: all : all
3。/etc/host.conf 中配置如下:
# Lookup names via DNS first then fall back to /etc/hosts.
order bind,hosts
-----------------------------------------------
使用:mail -s test my@email.com <mail.txt 命令往internet发一封邮件失败
在 /var/log/maillog 中发现错误:
---------------------------------------------------------------
Dec 29 10:36:58 rhelas3 sendmail[22236]: iBT2aw2l022236: from=root, size=55, class=0, nrcpts=1, msgid=<200412290236.iBT2aw2l022236@localhost.localdomain>, relay=root@localhost
Dec 29 10:36:58 rhelas3 sendmail[22238]: iBT2awjn022238: tcpwrappers (rhelas3, 127.0.0.1) rejection
Dec 29 10:36:58 rhelas3 sendmail[22236]: iBT2aw2l022236: to=dk@zsnet.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30055, relay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, stat=Service unavailable
Dec 29 10:36:58 rhelas3 sendmail[22236]: iBT2aw2l022236: iBT2aw2m022236: DSN: Service unavailable
Dec 29 10:36:58 rhelas3 sendmail[22236]: iBT2aw2m022236: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31079, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Dec 29 10:36:58 rhelas3 sendmail[22236]: iBT2aw2m022236: iBT2aw2n022236: return to sender: Service unavailable
Dec 29 10:36:58 rhelas3 sendmail[22236]: iBT2aw2n022236: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32103, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Dec 29 10:36:58 rhelas3 sendmail[22236]: iBT2aw2m022236: Losing ./qfiBT2aw2m022236: savemail panic
Dec 29 10:36:58 rhelas3 sendmail[22236]: iBT2aw2m022236: SYSERR(root): savemail: cannot save rejected email anywhere
---------------------------------------------------------------