2025年7月10日 星期四

[研究]寄信失敗 Fatal SMTP error relaying the message to server

[研究]寄信失敗 Fatal SMTP error relaying the message to server

2025-07-10

(已經把一些真實訊息替換掉了)

請問寄信失敗原因 ?

2025/7/10 上午 11:32:16 - SMTP Server started. Listening on port 26
2025/7/10 上午 11:36:28 - Requested SMTP connection from (遮蔽3)
2025/7/10 上午 11:36:28 - Received 10876 bytes
2025/7/10 上午 11:36:29 - [     2] Delivering to user1@mytest.tw
2025/7/10 上午 11:36:29 - [     2] Attempting to deliver to the domain mytest.tw
2025/7/10 上午 11:36:29 - [     2] Retrieved 5 MX records for domain mytest.tw
2025/7/10 上午 11:36:29 - [     2] Trying the server ms1.mytest.tw: (遮蔽)
2025/7/10 上午 11:36:32 - [     2] Fatal SMTP error relaying the message to server ms1.mytest.tw: (遮蔽): 553 #5.1.8 Domain of sender address <mySys@mytest.tw> does not exist
2025/7/10 上午 11:36:32 - [     2] Trying the server smtp.mytest.tw: (遮蔽2)
2025/7/10 上午 11:36:48 - [     2] Message from mySys@mytest.tw relayed to 1 recipient(s) on the domain mytest.tw
2025/7/10 上午 11:37:28 - Error: Operation has been canceled
2025/7/10 上午 11:37:28 - SMTP connection with (遮蔽3) ended. ID=1

ChatGPT 說:

從您提供的 SMTP log 記錄來看,寄信失敗的主要原因如下:

❌ 錯誤重點

2025/7/10 上午 11:36:32 - [     2] Fatal SMTP error relaying the message to server ms1.mytest.tw: (遮蔽): 553 #5.1.8 Domain of sender address <mySys@mytest.tw> does not exist

📌 錯誤代碼分析:

553 #5.1.8:SMTP 伺服器拒絕寄件者位址,表示寄件者的網域名稱無效或不存在。

訊息說明:Domain of sender address <mySys@mytest.tw> does not exist

也就是說,目標 SMTP server ms1.mytest.tw 嘗試驗證寄件者 mySys@mytest.tw 的網域,但 DNS 查不到 mytest.tw 或該寄件帳號的網域不正確,因此拒絕接收信件。

✅ 可能解法建議:

1.確認寄件人信箱的網域名稱是否有效:

  • 查詢 DNS 看看 mytest.tw 是否真的存在:nslookup mytest.tw
  • 如果這個網域已不存在或不是對方伺服器可認識的網域,那就要改用有效的寄件者網域。

2.檢查你的 SMTP 軟體是否正確設定 From Address:

  • 確保寄件地址 mySys@mytest.tw 的網域有對應的 DNS 紀錄(尤其是 A、MX、SPF)。
  • 若你不是該網域的擁有者,不建議用該網域寄信,因為 SPF/DKIM 驗證會失敗,導致被拒收。

3.如果你的 SMTP Server 沒有做 DNS 解析,請檢查它是否可以正常查詢外部網域。

4.觀察後續行為:

2025/7/10 上午 11:36:48 - Message from mySys@mytest.tw relayed to 1 recipient(s) on the domain mytest.tw

表示第二台 SMTP server(smtp.mytest.tw)接受了該郵件,但:

2025/7/10 上午 11:37:28 - Error: Operation has been canceled

最後還是有個「Operation has been canceled」錯誤,這可能是超時、手動取消、或信件處理逾時。

🟡 建議後續調查:

  • 確認 mySys@mytest.tw 是否為你主控的帳號
  • 或改用其他合法網域如 yourdomain.com
  • 查看你的 SMTP 軟體(例如 hMailServer、MailEnable、IIS SMTP Server)是否支援 SPF/DKIM 驗證,並設定反向 DNS

****************************************

看訊息好像寄信失敗,但實際上最後信件有收到,待研究。

(完)

沒有留言:

張貼留言