postfix 无法向外部域发送电子邮件

postfix 无法向外部域发送电子邮件

每当我尝试从我的服务器发送电子邮件时,都会出现以下错误:

Nov 13 06:37:21 xyz postfix/smtpd[6730]:connect from unknown[a.b.c.d]
Nov 13 06:37:21 xyz postfix/smtp[6729]: warning: host X.com[x.y.z.d]:25 greeted me with my own hostname xyz.biz
Nov 13 06:37:21 xyz postfix/smtp[6729]: warning: host X.com[x.y.z.d]:25 replied to HELO/EHLO with my own hostname xyz.biz
Nov 13 06:37:21 xyz postfix/smtp[6729]: 2017F1B00C54: to=<[email protected]>, relay=X.com[x.y.z.d]:25, delay=0.98, delays=0.17/0/0.81/0, dsn=5.4.6, status=bounced (mail for X.com loops back to myself)

这是 postconf -n 的输出:

address_verify_poll_delay = 1s
alias_database = hash:/etc/aliases
alias_maps =
body_checks_size_limit = 40980000
command_directory = /usr/sbin
config_directory = /etc/postfix
connection_cache_ttl_limit = 300000s
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 1
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
default_delivery_slot_cost = 2
default_destination_concurrency_limit = 10
default_destination_recipient_limit = 1
default_minimum_delivery_slots = 3
default_process_limit = 10000
default_recipient_refill_delay = 1s
default_recipient_refill_limit = 10
disable_dns_lookups = yes
enable_original_recipient = no
hash_queue_depth = 2
home_mailbox = Maildir/
html_directory = no
in_flow_delay = 0
inet_interfaces = all
inet_protocols = ipv4
initial_destination_concurrency = 100
local_header_rewrite_clients =
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
master_service_disable =
milter_default_action = accept
milter_protocol = 6
mydestination = $myhostname, localhost.localdomain, localhost, $mydomain
mydomain = xyz.biz
myhostname = xyz.biz
mynetworks = 168.100.189.0/28, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
non_smtpd_milters = $smtpd_milters
qmgr_message_active_limit = 500
qmgr_message_recipient_limit = 500
qmgr_message_recipient_minimum = 1
queue_directory = /var/spool/postfix
queue_run_delay = 300s
readme_directory = /usr/share/doc/postfix.20.10.2/README_FILE
receive_override_options = no_header_body_checks
sample_directory = /usr/share/doc/postfix.2.10.2/examples
sendmail_path = /usr/sbin/sendmail
service_throttle_time = 1s
setgid_group = postdrop
smtp_always_send_ehlo = no
smtp_connect_timeout = 1s
smtp_connection_cache_time_limit = 30000s
smtp_connection_reuse_time_limit = 30000s
smtp_delivery_slot_cost = 2
smtp_destination_concurrency_limit = 10000
smtp_destination_rate_delay = 0s
smtp_destination_recipient_limit = 1
smtp_minimum_delivery_slots = 1
smtp_recipient_refill_delay = 1s
smtp_recipient_refill_limit = 1000
smtpd_client_connection_count_limit = 200
smtpd_client_connection_rate_limit = 0
smtpd_client_message_rate_limit = 100000
smtpd_client_new_tls_session_rate_limit = 0
smtpd_client_recipient_rate_limit = 0
smtpd_delay_open_until_valid_rcpt = no
smtpd_delay_reject = no
smtpd_discard_ehlo_keywords = silent-discard, dsn
smtpd_milters = inet:127.0.0.1:8891
smtpd_peername_lookup = no
unknown_local_recipient_reject_code = 550

可能是什么问题?

答案1

我想说的是,您有某种防火墙(可能是 iptables)将端口 25 重定向到您自己的邮件服务器,请尝试从该规则中排除该邮件服务器的地址。

答案2

在您的服务器的 /etc/hosts 文件中,也许您在 127.0.0.1 行上没有您的主机名?

答案3

我无法发送或接收邮件,然后可以发送但不能接收,现在它恢复正常了

检查这个答案是否可以帮助你(阅读我在问题中的编辑和下面的回答) 服务器(硬件)更改后,Postfix 不发送/允许接收消息

答案4

X.com 和 mydestination = 是分开的吗?另外,我相信你需要在 myhostname 下设置 mydestination,这样我们才能确保在 mydestination 中读取该变量之前,该变量已经设置

相关内容