歡迎您光臨本站 註冊首頁

無法通過mail 命令對外發郵件

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

無法通過mail 命令對外發郵件

在linux上通過 mail test@126.com 發郵件

在 test@126.com 中一直沒有收到郵件,檢查以下配置都沒有問題

郵件LOG如下



Dec 27 17:12:16 cacti sendmail: My unqualified host name (cacti) unknown; sleeping for retry
Dec 27 17:13:16 cacti sendmail: unable to qualify my own domain name (cacti) -- using short name
Dec 27 17:13:16 cacti sendmail: nBR9DG67008142: from=root, size=46, class=0, nrcpts=1, msgid=<200912270913.nBR9DG67008142@cacti>, relay=root@localhost
Dec 27 17:13:16 cacti sendmail: nBR9DG25008275: from=<root@cacti>, size=309, class=0, nrcpts=1, msgid=<200912270913.nBR9DG67008142@cacti>, proto=ESMTP, daemon=MTA, relay=localhost (may be forged)
Dec 27 17:13:16 cacti sendmail: nBR9DG67008142: to=test@126.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30046, relay= , dsn=2.0.0, stat=Sent (nBR9DG25008275 Message accepted for delivery)
Dec 27 17:13:16 cacti sendmail: nBR9DG25008275: to=<test@126.com>, ctladdr=<root@cacti> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120309, relay=mx.126.com. , dsn=4.0.0, stat=Deferred: 450 Requested mail action not taken: Invalid sender
Dec 27 17:14:16 cacti sendmail: My unqualified host name (cactir) unknown; sleeping for retry




麻煩,各位看看,謝謝

[ 本帖最後由 大血落彎刀 於 2009-12-27 17:28 編輯 ]
《解決方案》

Dec 27 17:13:16 cacti sendmail: nBR9DG25008275: to=<test@126.com>, ctladdr=<root@cacti> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120309, relay=mx.126.com. , dsn=4.0.0, stat=Deferred: 450 Requested mail action not taken: Invalid sender
Dec 27 17:14:16 cacti sendmail: My unqualified host name (cactir) unknown; sleeping for retry

已經說得相當清楚了。你的sendmail中需要指定host name的全域名,也就是hostname需要cacti.xxx.xxx,可以修改系統的相關設置。
當你給126發送郵件的時候,驗證用戶身份你僅僅是cactir,然後就被126拒絕了。
《解決方案》

原帖由 大血落彎刀 於 2009-12-27 17:26 發表 http://linux.chinaunix.net/bbs/images/common/back.gif
在linux上通過 mail test@126.com 發郵件

在 test@126.com 中一直沒有收到郵件,檢查以下配置都沒有問題

郵件LOG如下



Dec 27 17:12:16 cacti sendmail: My unqualified host name (cacti) u ...


#cat /etc/sysconfig/network
HOSTNAME=mail.mydomain.com

#cat /etc/hosts
127.0.0.1                mail.mydomain.com localhost.localdomain localhost

上述兩個文件最後都修改一下,然後重啟系統,或者重啟sendmail.

然後使用這個命令來檢測一下。
#sendmail -d0
《解決方案》

回復 #3 blueswxs 的帖子

修改後,還是無法發信
《解決方案》

iptables -F
《解決方案》

回復 #5 7717060 的帖子

埠都打開了,沒有問題
《解決方案》

原帖由 大血落彎刀 於 2010-1-1 22:51 發表 http://linux.chinaunix.net/bbs/images/common/back.gif
修改後,還是無法發信


日誌有什麼變化么?
《解決方案》

原帖由 blueswxs 於 2010-1-4 12:55 發表 http://linux.chinaunix.net/bbs/images/common/back.gif



日誌有什麼變化么?
恩看日誌再

[火星人 ] 無法通過mail 命令對外發郵件已經有952次圍觀

http://coctec.com/docs/service/show-post-19271.html