国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Linux SendMail發送郵件失敗診斷案例

2024-06-28 13:22:52
字體:
來源:轉載
供稿:網友
linux SendMail發送郵件失敗診斷案例 2014-12-18 14:35 by 瀟湘隱者, ... 閱讀, ... 評論, 收藏, 編輯

Linux上Sendmail經常由于一些配置問題,導致郵件發送失敗,下面整理、收集了一些郵件發送失敗、異常的案例。

案例1:在新服務器上測試sendmail發送郵件時,發現郵件發送不成功,檢查/var/log/maillog日志文件發現如下錯誤(Notice:hostname、郵箱地址等信息使用xxx代替)

tail /var/log/maillog

May 15 09:43:38 xxxxx sendmail[9182]: s4F1hcQe009182: from=root, size=58269, class=0, nrcpts=1, msgid=<201405150143.s4F1hcQe009182@xxxx>, relay=root@localhostMay 15 09:43:38 xxxxx sendmail[9182]: s4F1hcQe009182: to=konglb@xxxx, delay=00:00:00, mailer=esmtp, PRi=88269, dsn=4.4.3, stat=queuedMay 15 09:43:58 xxxxx sendmail[9186]: NOQUEUE: SYSERR(Oracle): can not chdir(/var/spool/mqueue/): Permission denied

出現這個問題,是因為oracle賬號沒有權限訪問/var/spool/mqueue,需要授予相關權限,如下所示:

chmod 755 /var/spool/mqueue

案例2:查看var/log/maillog日志文件發現如下錯誤

May 15 10:21:41 xxxxx sendmail[9850]: s4F2LfrT009850: to=<konglb@xxxx>, delay=00:00:00, mailer=esmtp, pri=37549, dsn=4.4.3, stat=queued

出現這個問題是因為dns server不正確設置導致,需要修改/etc/resolv.conf 下的nameserver值。

案例3:檢查/var/log/maillog發現如下信息,郵件狀態為Sent(stat=Sent),但是依然沒有收到郵件。

[root@DB-Server mail]# tail /var/log/maillog

Dec 18 11:15:01 nbolnx01 sendmail[25312]: sBI3F18J025312: from=<oracle@xxxx.xxxx>, size=607, class=0, nrcpts=1, msgid=<201412180315.sBI3F12b025302@nbolnx01.xxxx.xxxx>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]Dec 18 11:15:01 nbolnx01 sendmail[25302]: sBI3F12b025302: to=oracle, ctladdr=oracle (502/502), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30290, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (sBI3F18J025312 Message accepted for delivery)Dec 18 11:15:01 nbolnx01 sendmail[25327]: sBI3F1mw025327: from=<oracle@xxxx.xxxx>, size=599, class=0, nrcpts=1, msgid=<201412180315.sBI3F1Ba025321@xxxx.xxxx>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]Dec 18 11:15:01 nbolnx01 sendmail[25321]: sBI3F1Ba025321: to=oracle, ctladdr=oracle (502/502), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30282, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (sBI3F1mw025327 Message accepted for delivery)

檢查mailq,如下所示,發現大量郵件處于等待發送的隊列

[root@DB-Server mail]# mailq...................................................................................................................................................................................................sBD2j1tq000440 214 Sat Dec 13 10:45 <oracle@xxxx.xxxx> (host map: lookup (xxxx.com): deferred) konglb@xxxx.comsBD301x9000637 214 Sat Dec 13 11:00 <oracle@xxxx.xxxx> (host map: lookup (xxxx.com): deferred) konglb@xxxx.xxxx Total requests: 120[root@nbolnx01 mail]#

出現了"host map: lookup (domain): deferred"錯誤,意味著郵件的發送被延遲了。需要通過修改配置文件/etc/mail/sendmail.cf。找到 #O ResolverOptions=+AAONLY 這一行信息后將注釋取消掉,然后重啟sendmail服務即可解決問題。

clip_image001

[root@DB-Server ~]# service sendmail stop

Shutting down sm-client: [ OK ]

Shutting down sendmail: [ OK ]

[root@DB-Server ~]# service sendmail start

Starting sendmail: [ OK ]

Starting sm-client: [ OK ]

參考資料:

http://www.51osos.com/a/Linux_CentOS_RedHat/Linuxjichu/2010/1001/107.html

http://www.CUOXin.com/AloneSWord/archive/2013/07/20/3203050.html

http://blog.chinaunix.net/uid-11888131-id-2804023.html

http://fanli7.net/a/caozuoxitong/OS/20120703/180401.html

http://blog.csdn.net/kindy1022/article/details/7639096


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 彭州市| 阳泉市| 三明市| 宁明县| 琼结县| 贡嘎县| 深水埗区| 乌兰浩特市| 望谟县| 尖扎县| 弥渡县| 施甸县| 茂名市| 衡东县| 武夷山市| 临沧市| 利津县| 运城市| 和田县| 安陆市| 偏关县| 织金县| 沭阳县| 临武县| 鄂托克前旗| 黄陵县| 靖边县| 齐河县| 黎城县| 赣榆县| 定陶县| 九江县| 德惠市| 故城县| 额尔古纳市| 滕州市| 永胜县| 秦皇岛市| 南溪县| 逊克县| 蓝田县|