我有一台专用服务器,其中装有 Postfix MTA 和一台在服务器上运行的虚拟机。但我在从虚拟机上配置的网站发送电子邮件时遇到了问题。当我尝试发送电子邮件时,它给出了以下错误。
Jan 28 07:38:17 app postfix/smtpd[10806]: connect from unknown[10.28.169.130]
Jan 28 07:38:17 app postfix/smtpd[10806]: lost connection after EHLO from unknown[10.28.169.130]
Jan 28 07:38:17 app postfix/smtpd[10806]: disconnect from unknown[10.28.169.130]
其中 10.28.169.130 是专用系统的私有接口。我可以使用此 MTA 从其他服务器发送邮件,但 VM 实例存在问题。
Postfix 配置如下。
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = xx.xx.xx.xx
inet_protocols = ipv4
local_transport = xxx.xxxx.xxx
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 0
milter_default_action = accept
milter_protocol = 6
multi_instance_directories =
multi_instance_enable = yes
multi_instance_wrapper = ${command_directory}/postmulti -p --
mydestination = xxx.xxxx.xxx
myhostname = xxx.xxxx.xxx
mynetworks = 127.0.0.0/8, $myhostname
myorigin = xxx.xxxx.xxx
newaliases_path = /usr/bin/newaliases.postfix
#DKIM Config
non_smtpd_milters = inet:localhost:8891
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_helo_name = xxx.xxxxx.xxx
smtpd_banner = xxxx Email System
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/mailserver/server.pem
smtpd_tls_key_file = /etc/ssl/mailserver/server.key
smtpd_tls_loglevel = 0
smtpd_tls_received_header = no
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_session_cache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:12
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 505
virtual_transport = dovecot
virtual_uid_maps = static:505
请帮助我解决这个问题。谢谢
答案1
您可以做以下两件事之一:首先,将 10.28.169.130/32 添加到您的 mynetworks 声明中,或者放宽发送限制。目前,您只有在 mynetworks 中才能发送,或者提供 sasl 身份验证。