Postfix SMTPUTF8 is required, but was not offered by host 導至 PHP 無法寄信

Linux

Postfix 因 SMTPUTF8 is required, but was not offered by host 導至 PHP Email 無法寄信的解決方式。

SMTPUTF8 is required, but was not offered by host

查看 Email log 記錄檔,會發現因為 SMTPUTF8 is required, but was not offered by host 導致 Email 無法正常寄信:

sudo vim /etc/log/maillog
448 Aug 25 16:38:02 fortop postfix/qmgr[26422]: 92A8AC0A374D: removed
449 Aug 25 16:38:02 fortop postfix/smtp[27679]: A0C63C0A374C: to=jacky.wang@fortop.com.tw, orig_to=root@fortop.fortop.com.tw, relay=fortop.com.tw[220.130.84.72]:25, delay=0.07, delays=0.03/0/0.04/0, dsn=5.6.7, status=bounced (SMTPUTF8 is required, but was not offered by host fortop.com.tw[220.130.84.72])
450 Aug 25 16:38:02 fortop postfix/qmgr[26422]: A0C63C0A374C: removed
451 Aug 25 16:39:46 fortop postfix/postfix-script[28255]: stopping the Postfix mail system
452 Aug 25 16:39:46 fortop postfix/master[26420]: terminating on signal 15
453 Aug 25 16:39:47 fortop postfix/postfix-script[28346]: starting the Postfix mail system
454 Aug 25 16:39:47 fortop postfix/master[28348]: daemon started -- version 3.5.8, configuration /etc/postfix
455 Aug 25 16:40:51 fortop postfix/postfix-script[28822]: stopping the Postfix mail system
456 Aug 25 16:40:51 fortop postfix/master[28348]: terminating on signal 15
457 Aug 25 16:40:51 fortop postfix/postfix-script[28904]: starting the Postfix mail system
458 Aug 25 16:40:52 fortop postfix/master[28906]: daemon started -- version 3.5.8, configuration /etc/postfix
459 Aug 25 16:42:02 fortop postfix/pickup[28907]: 87AE7C0A374C: uid=0 from=
460 Aug 25 16:42:02 fortop postfix/cleanup[29326]: 87AE7C0A374C: message-id=20210825084202.87AE7C0A374C@fortop.fortop.com.tw
461 Aug 25 16:42:02 fortop postfix/qmgr[28908]: 87AE7C0A374C: from=root@fortop.fortop.com.tw, size=2932, nrcpt=2 (queue active)
462 Aug 25 16:42:03 fortop postfix/smtp[29330]: 87AE7C0A374C: to=jacky.wang@fortop.com.tw, relay=fortop.com.tw[220.130.84.72]:25, delay=1.3, delays=0.16/0.05/0.04/1.1, dsn=2.0.0, status=sent (250 mail received, ready to proceed.)
463 Aug 25 16:42:03 fortop postfix/smtp[29330]: 87AE7C0A374C: to=yams0409@fortop.com.tw, relay=fortop.com.tw[220.130.84.72]:25, delay=1.3, delays=0.16/0.05/0.04/1.1, dsn=2.0.0, status=sent (250 mail received, re ady to proceed.)
464 Aug 25 16:42:03 fortop postfix/qmgr[28908]: 87AE7C0A374C: removed
"/var/log/maillog" 464L, 64336C

解決方式

如下設定後重啟 Postfix,即可正常寄信了:

sudo vim /etc/postfix/mail.cf
smtputf8_autodetect_classes = sendmail, verify
smtputf8_enable = no
strict_smtputf8 = no

重啟 Postfix

sudo systemctl restart postfix.service

參考

發表留言