远程服务器上的后缀SMTP响应rcpt(收件人)的554中继访问被拒绝。在'上工作正常;本地主机';smtp服务器
我正在尝试通过一个远程虚拟机发送电子邮件,该虚拟机作为smtp服务器运行远程服务器上的后缀SMTP响应rcpt(收件人)的554中继访问被拒绝。在'上工作正常;本地主机';smtp服务器,smtp,postfix-mta,Smtp,Postfix Mta,我正在尝试通过一个远程虚拟机发送电子邮件,该虚拟机作为smtp服务器运行postfix 但是,在发送rcptcmd时,我收到了一个554-中继访问被拒绝错误 (554, b'5.7.1 <xxxxx@xyz.org>: Relay access denied') 从来宾计算机运行时,不会发生以下错误: postfix服务器上的main.cf中将出现配置错误,该服务器未将本地网络设置为允许中继 你需要像这样的东西吗 Localnetworks=0.0.0.0/24(您的网络或ip是来
postfix
但是,在发送rcpt
cmd时,我收到了一个554-中继访问被拒绝
错误
(554, b'5.7.1 <xxxxx@xyz.org>: Relay access denied')
从来宾计算机运行时,不会发生以下错误:
postfix服务器上的main.cf中将出现配置错误,该服务器未将本地网络设置为允许中继 你需要像这样的东西吗
Localnetworks=0.0.0.0/24(您的网络或ip是来宾计算机)Postfix“Ubuntu上的默认配置只允许在本地接口(即localhost)上进行中继访问。在其他接口(VM网络)上连接时,需要SMTP身份验证 因此,您可以将身份验证添加到SMTP呼叫或将主机ip添加到允许的中继网络 要实现后者,请在
/etc/postfix/main.cf
文件中找到以下行
mynetworks = 127.0.0.0/8
并将其更改为
127.0.0.0/8,10.0.0.0/8
然后用
sudo postfix reload
编辑:
或者,您可以将mynetworks\u样式设置设置为
mynetworks_style = subnet
请参见问题已解决。这是我现在使用的配置。问题在于mynetworks
指令,原因是itchee
# 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.
myhostname = localhost
#myorigin = $mydomain
#relayhost = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localdomain, localhost, localhost.localdomain, localhost
relayhost =
#mynetworks = 127.0.0.0/8 [::]/128 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks = 127.0.0.0/8 10.0.0.0/8 172.0.0.0/8 [::]/128 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
#inet_interfaces = localhost
Mar 24 22:57:38 04305ce1d661后缀/smtpd[25121]:无队列:拒绝:来自未知的RCPT[172.17.42.1]:554 5.7.1:拒绝中继访问;from=to=proto=SMTPHi eclewlow,欢迎使用堆栈交换网络!既然是伊奇的回答帮助你解决了问题,你应该接受他们的回答,给他们荣誉,并告诉其他人你的问题已经解决了。有关详细信息,请参阅。另外:这更像是一个系统管理问题,而不是一个与编程相关的问题,因此它与StackOverflow无关。服务器故障已经过去。花了3个小时来研究这个问题,这个问题和那个问题完全一样。谢谢你的帮助!你是我的英雄
mynetworks_style = subnet
# 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.
myhostname = localhost
#myorigin = $mydomain
#relayhost = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localdomain, localhost, localhost.localdomain, localhost
relayhost =
#mynetworks = 127.0.0.0/8 [::]/128 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks = 127.0.0.0/8 10.0.0.0/8 172.0.0.0/8 [::]/128 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
#inet_interfaces = localhost