今天在伺服器上安裝了IMail用來收發郵件,使用的是IMail的版本是8.22。安裝了設定的步驟就不說了,網上有很多資料。我進行的也很順利。然後進行郵箱測試,我使用的是Foxmail。結果接受郵件正常,但是不能發送郵件。使用Foxmail發送的時候也沒有報錯。
我首先檢查服務和連接埠是否開啟,使用方法是telnet命令連結SMTP服務的連接埠,服務運行正常。
查看IMail的記錄檔
02:08 08:46 SMTPD(5ee5013f00000003) [58.218.209.87] connect 121.233.17.1 port 2195
02:08 08:46 SMTPD(5ee5013f00000003) [121.233.17.1] EHLO client
02:08 08:46 SMTPD(5ee5013f00000003) Authenticated master@domain.com, session treated as local.
02:08 08:46 SMTPD(5ee5013f00000003) [121.233.17.1] MAIL FROM: <master@domain.com>
02:08 08:46 SMTPD(5ee5013f00000003) [121.233.17.1] RCPT TO: <372121888@qq.com>
02:08 08:46 SMTPD(5ee5013f00000003) [121.233.17.1] D:\Software\IMail\spool\D5ee5013f00000003.SMD 1573
02:08 08:46 SMTP-(5ee5013f00000003) processing D:\Software\IMail\spool\Q5ee5013f00000003.SMD
02:08 08:46 SMTP-(5ee5013f00000003) [Att-Blk] ERR: Unable to get Host Attachment Blocking for yajuke.com
02:08 08:46 SMTP-(5ee5013f00000003) [Att-Blk] ERR: Unable to find Attachment Blocking Host Info for yajuke.com
02:08 08:46 SMTP-(5ee5013f00000003) Trying qq.com (0)
02:08 08:46 SMTP-(5ee5013f00000003) Stack connect fail "119.147.15.17"
02:08 08:47 SMTP-(5ee5013f00000003) Stack connect fail "119.147.15.13"
02:08 08:47 SMTP-(5ee5013f00000003) requeuing D:\Software\IMail\spool\Q5ee5013f00000003.SMD R0 T1
02:08 08:47 SMTP-(5ee5013f00000003) finished D:\Software\IMail\spool\Q5ee5013f00000003.SMD status=3
可以看都在解析qq.com的網域名稱是出錯,所以問題應該出在DNS的上面。
02:08 08:46 SMTP-(5ee5013f00000003) Trying qq.com (0)
02:08 08:46 SMTP-(5ee5013f00000003) Stack connect fail "119.147.15.17"
02:08 08:47 SMTP-(5ee5013f00000003) Stack connect fail "119.147.15.13"
檢查Imail的SMTP的設定,發現Domain Name Server address這一項沒有設定, 設定為原生DNS伺服器的地址。收發郵件的服務就都正常了。