Ubuntu

Postfix 外部 SMTP 身份驗證 - 登錄使用者錯誤?

  • January 11, 2017

我正在嘗試利用 Postfix 作為 Raspberry Pi 上的 SMTP 中繼器,以允許我網路上的其他系統通過電子郵件發送出站系統消息。似乎有兩個問題,(1)它沒有以指定使用者身份進行身份驗證,(2)它似乎正在嘗試將電子郵件傳遞到遠端伺服器上的本地郵箱,如下所示:

550 - 550 驗證失敗 - 郵件伺服器無法將郵件傳遞到 root@unifipi

郵件日誌

Jan 10 21:43:47 UniFiPi postfix/master[28775]: reload -- version 2.11.3, configuration /etc/postfix
Jan 10 21:43:50 UniFiPi postfix/pickup[786]: 31D8C3F9F5: uid=0 from=<root@UniFiPi>
Jan 10 21:43:50 UniFiPi postfix/cleanup[793]: 31D8C3F9F5: message-id=<20170111024350.31D8C3F9F5@unifipi.home.lan>
Jan 10 21:43:50 UniFiPi postfix/qmgr[785]: 31D8C3F9F5: from=<root@UniFiPi>, size=383, nrcpt=1 (queue active)
Jan 10 21:43:51 UniFiPi postfix/smtp[795]: 31D8C3F9F5: to=<johndoe@outlook.com>, relay=mail.mydomain.com[170.75.252.58]:587, delay=1, delays=0.08/0.08/0.67/0.22, dsn=5.0.0, status=bounced (host mail.mydomain.com[170.75.252.58] said: 550-Verification failed for <root@UniFiPi> 550-The mail server could not deliver mail to root@unifipi.  The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command))
Jan 10 21:43:51 UniFiPi postfix/cleanup[793]: 412C53F9F6: message-id=<20170111024351.412C53F9F6@unifipi.home.lan>
Jan 10 21:43:51 UniFiPi postfix/bounce[797]: 31D8C3F9F5: sender non-delivery notification: 412C53F9F6
Jan 10 21:43:51 UniFiPi postfix/qmgr[785]: 412C53F9F6: from=<>, size=2640, nrcpt=1 (queue active)
Jan 10 21:43:51 UniFiPi postfix/qmgr[785]: 31D8C3F9F5: removed
Jan 10 21:43:52 UniFiPi postfix/smtp[795]: 412C53F9F6: to=<root@UniFiPi>, relay=mail.mydomain.com[170.75.252.58]:587, delay=0.75, delays=0.02/0/0.51/0.22, dsn=2.0.0, status=sent (250 OK id=1cR8tC-003Asy-Tc)
Jan 10 21:43:52 UniFiPi postfix/qmgr[785]: 412C53F9F6: removed

main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Raspbian)
biff = no
append_dot_mydomain = no
readme_directory = no
myhostname = unifipi.home.lan
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:user@mydomain.com:password
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_use_tls = yes
header_size_limit = 4096000
relayhost = [mail.mydomain.com]:587
inet_interfaces = all
inet_protocols = all

非常感激任何的幫助!謝謝!

您必須將原始碼重寫為與您的 sasl auth 使用者相同。

發件人名稱可以是任何名稱,如果這不是您想要的,或者您被允許使用該帳戶冒充,則使用有效的發件人地址

請參閱https://serverfault.com/a/674984/200560

引用自:https://serverfault.com/questions/825610