Postfix 不从邮件客户端向外部域发送电子邮件

Postfix 不从邮件客户端向外部域发送电子邮件

我刚刚在虚拟服务器上设置完 postfix 和 dovecot。我可以使用 mailx 从 Linux 控制台向外部电子邮件地址发送电子邮件,但当我尝试在 Outlook 或任何其他电子邮件客户端上设置邮件帐户时,服务器返回以下错误:

454 4.7.1 <[email protected]>: Relay access denied

下面是我的 postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
meta_directory = /etc/postfix
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = mail.example.com #hiding the actual server name
myhostname = example.com #hiding the actual server name
mynetworks = 192.168.30.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix/README_FILES
relayhost =
sample_directory = /usr/share/doc/postfix/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
shlib_directory = /usr/lib64/postfix
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_tls_CApath = /etc/pki/tls/certs
smtp_tls_security_level = may
smtpd_sasl_auth_enable = yes
smtpd_tls_cert_file = /etc/pki/tls/certs/postfix.pem
smtpd_tls_key_file = /etc/pki/tls/private/postfix.key
smtpd_tls_security_level = may
unknown_local_recipient_reject_code = 550

我在这里做错了什么?

答案1

首先,在 main.cf 中注释“relayhost =”行,然后如果继续失败,请提供更多日志。问候

相关内容