Sendmail:Maillog 不够详细

Sendmail:Maillog 不够详细

我使用 sendmail 通过 Mandrill SMTP 发送 Web 应用程序的请求。我注意到以下情况有些奇怪/var/log/maillog

Mar 17 08:29:12 misc sendmail[34684]: u2C9wjxD053642: to=<[email protected]>, delay=4+22:30:23, xdelay=00:00:23, mailer=esmtp, pri=10835166, relay=dddd.com. [119.28.2.127], dsn=4.0.0, stat=Deferred: Connection refused by dddd.com. [dev@misc mail]$ sudo tail /var/log/maillog -n 50 | grep dddd Mar 16 16:44:10 misc sendmail[53280]: u2C9wjxD053642: to=<[email protected]>, delay=4+06:45:21, xdelay=00:00:19, mailer=esmtp, pri=9395166, relay=dddd.com. [119.28.2.127], dsn=4.0.0, stat=Deferred: Connection refused by dddd.com. Mar 16 17:44:05 misc sendmail[56180]: u2C9wjxD053642: to=<[email protected]>, delay=4+07:45:16, xdelay=00:00:20, mailer=esmtp, pri=9485166, relay=dddd.com. [119.28.2.127], dsn=4.0.0, stat=Deferred: Connection refused by dddd.com. Mar 16 18:43:45 misc sendmail[59065]: u2C9wjxD053642: to=<[email protected]>, delay=4+08:44:56, xdelay=00:00:07, mailer=esmtp, pri=9575166, relay=dddd.com. [119.28.2.127], dsn=4.0.0, stat=Deferred: Connection refused by dddd.com. Mar 16 19:44:05 misc sendmail[61964]: u2C9wjxD053642: to=<[email protected]>, delay=4+09:45:16, xdelay=00:00:20, mailer=esmtp, pri=9665166, relay=dddd.com. [119.28.2.127], dsn=4.0.0, stat=Deferred: Connection refused by dddd.com.

这是一项按小时计费的工作,并且没有关于谁请求发送此信息的信息。我该如何彻底调试它?

答案1

我建议查找你的 syslog 或 rsyslog(有什么不同?

例如,我有 Debian 9,它有一个默认的 rsyslog.conf,类似...

    71 # Logging for the mail system.  Split it up so that                                                                         
    72 # it is easy to write scripts to parse these files.                                                                         
    73 #                                                                                                                           
    74 mail.info           -/var/log/mail.info                                                                                     
    75 mail.warn           -/var/log/mail.warn                                                                                     
    76 mail.err            /var/log/mail.err                                                                                       
    77                                                                                                                             
    78 #                                                                                                                           
    79 # Some "catch-all" log files.                                                                                               
    80 #                                                                                                                           
    81 *.=debug;\                                                                                                                  
    82     auth,authpriv.none;\                                                                                                    
    83     news.none;mail.none -/var/log/debug                                                                                     
    84 *.=info;*.=notice;*.=warn;\                                                                                                 
    85     auth,authpriv.none;\                                                                                                    
    86     cron,daemon.none;\                                                                                                      
    87     mail,news.none      -/var/log/messages         

就我而言,mail.log 不会显示错误,错误在 mail.err 中!只需查看这些附加文件,您就可以获得额外的详细信息。

似乎有一种方法可以通过编辑系统日志来进一步增加详细程度“日志级别“但我还没走那么远。如果你明白了,请随意编辑这个答案。

相关内容