无法弄清楚为什么转发被拒绝

问题描述 投票:0回答:2

以下是来自drupal客户端的一封邮件发生的情况。

$ grep 'B6693C0977' /var/log/maillog
Jan 19 14:12:30 instance-1 postfix/pickup[19329]: B6693C0977: uid=0 from=<[email protected]>
Jan 19 14:12:30 instance-1 postfix/cleanup[20035]: B6693C0977: message-id=<[email protected]>
Jan 19 14:12:30 instance-1 postfix/qmgr[19330]: B6693C0977: from=<[email protected]>, size=5681, nrcpt=1 (queue active)
Jan 19 14:12:33 instance-1 postfix/smtp[20039]: B6693C0977:
to=<[email protected]>, relay=smtp.mailgun.org[52.41.19.62]:2525, delay=2.4, 
delays=0.02/0.05/1.8/0.53, dsn=5.7.1, status=bounced (host smtp.mailgun.org
[52.41.19.62] said: 550 5.7.1 **Relaying denied** (in reply to RCPT TO command))
Jan 19 14:12:33 instance-1 postfix/bounce[20050]: B6693C0977: sender non-delivery notification: ABB94C0976
Jan 19 14:12:33 instance-1 postfix/qmgr[19330]: B6693C0977: removed

我的/etc/postfix/main.cf的相关摘录如下

# RELAYHOST SETTINGS
smtp_tls_security_level = encrypt
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_map

/etc/postfix/sasl_passwd是如下

@mailgun.domainA.com [email protected]:password

/etc/postfix/relayhost_map是如下

@mailgun.domainA.com [smtp.mailgun.org]:2525

db文件的权限如下

# ls -lZ /etc/postfix/relayhost_map.db
-rw-r-----. root postfix unconfined_u:object_r:postfix_etc_t:s0 /etc/postfix/relayhost_map.db
# ls -lZ /etc/postfix/sasl_passwd.db 
-rw-r-----. root postfix unconfined_u:object_r:postfix_etc_t:s0 /etc/postfix/sasl_passwd.db

问题是

  • 出境邮件不会发送。
  • mailgun控制台中没有显示日志。

任何见解都表示赞赏

mailgun
2个回答
0
投票

通常这与他们平台上的问题有关,如果一切正常,之前只是打开一张票,通常他们会在几个小时内修复它(是的,几个小时就有点困难)


0
投票

我知道这是一个古老的问题,但我刚刚遇到了同样的问题,并且希望在将来发表这篇文章的人发表回复。

我相信你的问题是在/etc/postfix/relayhost_map,你应该有以下内容,请注意,没有括号,对我来说,包含导致问题的括号:

@mailgun.domainA.com smtp.mailgun.org:2525

对于那些没有使用/etc/postfix/relayhost_map而且直接在/etc/postfix/sasl_passwd中完成所有操作的人同样适用:

smtp.mailgun.org:2525 [email protected]:password

不要忘记重新生成postfix sasl_passwd.db文件,然后重新启动服务

sudo postmap /etc/postfix/sasl_passwd
sudo systemctl restart postfix

或者sudo service postfix restart如果您使用的是较旧的系统/未运行systemd。

© www.soinside.com 2019 - 2024. All rights reserved.