一Linux服务器突然发送不出邮件,检查了很多地方都没有发现异常,检查/var/log/maillog发现如下具体信息:
Apr 12 00:36:04 mylinux sendmail[4685]: u3BGa4Is004685: Authentication-Warning: mylinux.xxx.xxxx.com: oracle set sender to BackupAdmin using -f
Apr 12 00:40:05 mylinux sendmail[4685]: u3BGa4Is004685: from=BackupAdmin, size=15288, class=0, nrcpts=2, msgid=<201604111636.u3BGa4Is004685@mylinux.xxx.xxx.com>, relay=oracle@localhost
Apr 12 00:40:05 mylinux sendmail[4685]: u3BGa4Is004685: to=xxx@xxxx.com, delay=00:04:01, mailer=esmtp, pri=75288, dsn=4.4.3, stat=queued
Apr 12 00:40:05 mylinux sendmail[4685]: u3BGa4Is004685: to=xxx@xxxx.com, delay=00:04:01, mailer=esmtp, pri=75288, dsn=4.4.3, stat=queued
Apr 12 01:20:50 mylinux sm-msp-queue[5126]: u36Ga6uI012217: u3BHGn6u005126: sender notify: Cannot send message for 5 days
Apr 12 01:24:50 mylinux sendmail[5166]: u3BHKo2I005166: <BackupAdmin@mylinux.xxx.xxx.com>... User unknown
Apr 12 01:24:50 mylinux sm-msp-queue[5126]: u3BHGn6u005126: to=BackupAdmin, delay=00:04:00, xdelay=00:04:00, mailer=relay, pri=46877, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Apr 12 01:24:50 mylinux sendmail[5166]: u3BHKo2I005166: from=<>, size=16877, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Apr 12 01:24:50 mylinux sm-msp-queue[5126]: u3BHGn6u005126: u3BHGn6v005126: return to sender: User unknown
Apr 12 01:24:50 mylinux sendmail[5166]: u3BHKo2K005166: from=<>, size=19381, class=0, nrcpts=1, msgid=<201604111724.u3BHGn6v005126@mylinux.xxx.xxx.com>, proto=ESMTP, daemon=MTA, relay=localhost.l
ocaldomain [127.0.0.1]
Apr 12 01:24:50 mylinux sm-msp-queue[5126]: u3BHGn6v005126: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=47901, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u3BHKo2K005166
Message accepted for delivery)
Apr 12 01:24:50 mylinux sendmail[5186]: u3BHKo2K005166: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=49614, dsn=2.0.0, stat=Sent
Apr 12 04:02:02 mylinux sendmail[7117]: u3BK22fR007117: from=root, size=1308, class=0, nrcpts=1, msgid=<201604112002.u3BK22fR007117@mylinux.xxx.xxx.com>, relay=root@localhost
Apr 12 04:06:02 mylinux sendmail[7121]: u3BK22q9007121: from=<root@mylinux.xxx.xxx.com>, size=1600, class=0, nrcpts=1, msgid=<201604112002.u3BK22fR007117@mylinux.xxx.xxx.com>, proto=ESMTP, d
aemon=MTA, relay=localhost.localdomain [127.0.0.1]
Apr 12 04:06:02 mylinux sendmail[7117]: u3BK22fR007117: to=root, ctladdr=root (0/0), delay=00:04:00, xdelay=00:04:00, mailer=relay, pri=31308, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u3BK
22q9007121 Message accepted for delivery)
Apr 12 04:06:02 mylinux sendmail[7160]: u3BK22q9007121: to=<root@mylinux.xxx.xxx.com>, ctladdr=<root@mylinux.xxx.xxx.com> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31843, dsn
=2.0.0, stat=Sent
Apr 12 05:20:50 mylinux sm-msp-queue[8038]: u3BGa4Is004685: u3BLGn6u008038: sender notify: Warning: could not send message for past 4 hours
Apr 12 05:24:50 mylinux sendmail[8077]: u3BLKoMB008077: <BackupAdmin@mylinux.xxx.xxx.com>... User unknown
在以前一篇文章中Linux SendMail发送邮件失败诊断案例(二)介 绍过,这个是DNS的配置问题,但是这一次,经过排查和同事提醒,才发现DNS服务器根本ping不通,后面沟通过后,才了解到系统管理员更改了DNS服 务器,以前旧的DNS服务器已经停用了。所以出现这个奇葩问题。修改了DNS服务器后,测试发现件处于等待发送的队列,重启sendmail服务后,问题 解决。