Postfix 客户端 sasl 465 退回 550 发件人被拒绝(回复 MAIL FROM 命令)

Postfix 客户端 sasl 465 退回 550 发件人被拒绝(回复 MAIL FROM 命令)

我尝试通过我的邮件提供商发送电子邮件但被拒绝,我的配置文件有问题吗?

echo "Hello" | mail -s "hi" [email protected]

给我

状态:退回 550 发件人被拒绝(回复 MAIL FROM 命令)

这是我的 postfix main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no

readme_directory = noanonymous

compatibility_level = 2

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = my.host.name
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, my.host.name, my, localhost.localdomain, localhost
relayhost = [my.smtp.provider]:465
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes
smtp_tls_wrappermode = yes
smtp_tls_security_level = encrypt

sasl_passwd 看起来像

[my.smtp.provider]:465 [email protected]:password

答案1

您应该发布完整的日志,因为信息太少,有点困难。无论如何,如果不阅读日志,我假设错误是由 my.smtp.provider smtp 服务器生成的,该服务器无法将其收到的 FROM 识别为有效发件人。

相关内容