我的服务器出现交付问题已经有一段时间了,但只有当发送到外部地址时,转发到我自己的电子邮件地址才有效。这个问题已经持续了很长时间,必须解决它。我一直在网上搜索“Postfix 中继访问被拒绝”,但没有一个解决方案能帮我解决这个问题,尽管我确实做了一些更改。
我在 Linode 上托管。这是我的 main.cf 文件
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
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
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination
myhostname = mail.emergenceguardian.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = spiritualselftransformation.com, www.spiritualselftransformation.com, localhost, localhost.spiritualselftransformation.com, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains = emergenceguardian.com shamanicattraction.com satrimono.com
virtual_alias_maps = hash:/etc/postfix/virtual
home_mailbox = mail/
我错过了什么?
该服务器应该 1. 将特定域名的电子邮件转发到我在其他地方托管的电子邮件帐户 2. 允许从我的网站发送电子邮件
另外,如果我在 mydestination 中写 spiritualselftransformation.com 或 emergenciesguardian.com,会有什么不同?我不知道这是否重要,但 EmergenceGuardian 电子邮件的 DNS 链接到 ProtonMail。
您还有什么建议进行调整吗?
谢谢
答案1
问题出在我的应用程序配置中,该应用程序被配置成发送到指向公共服务器 IP 的服务器公共地址,但该地址被拒绝了。我必须将公共 IP 添加到 mynetworks 中,或者将应用程序配置为发送到 localhost。