RCPT TO: 后远程邮件服务器拒绝中继 SMTP 错误

RCPT TO:  后远程邮件服务器拒绝中继 SMTP 错误

你好,当我想使用 exim 中的智能主机方法发送邮件并使用 Mailgun 作为中继的 SMTP 服务器时遇到了问题。

这是我的配置

dc_eximconfig_configtype='smarthost'
dc_other_hostnames='example.com'
dc_local_interfaces='127.0.0.1 ; ::1'
dc_readhost=''
dc_relay_domains='*'
dc_minimaldns='false'
dc_relay_nets='my_network_ip.0/24'
dc_smarthost='smtp.mailgun.org:587'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='false'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

然后当我尝试发送邮件并查找日志时,我得到了这个结果

2015-03-18 12:04:09 1YYChl-0002iS-14 <= [email protected] H=localhost ([email protected]) [127.0.0.1] P=esmtp S=752 id=84a9b3b278174ec2d634bfed7c42bac9.squirrel@localhost
2015-03-18 12:04:10 1YYChl-0002iS-14 ** [email protected] R=smarthost T=remote_smtp_smarthost: SMTP error from remote mail server after RCPT TO:<[email protected]>: host smtp.mailgun.org [50.56.21.178]: 550 5.7.1 Relaying denied
2015-03-18 12:04:10 1YYChm-0002ia-1K <= <> R=1YYChl-0002iS-14 U=Debian-exim P=local S=1690
2015-03-18 12:04:10 1YYChl-0002iS-14 Completed
2015-03-18 12:04:10 1YYChm-0002ia-1K => admin <[email protected]> R=vmail_deliver T=vmail_delivery
2015-03-18 12:04:10 1YYChm-0002ia-1K Completed

有人可以帮我解决这个问题吗?

答案1

这一页解释如何使用 mailgun 配置 exim。您需要设置中继主机和 SMTP 身份验证,以便 mailgun 接受您的电子邮件。

进入exim.conf和路线配置:

# In routes configuration
mailgun:
        driver = manualroute
        domains = ! +local_domains
        transport = mailgun_transport
        route_list = * smtp.mailgun.org byname

# In transports configuration:
    mailgun_transport:
    driver=smtp
    hosts_try_auth = smtp.mailgun.org

还要确保配置登录凭据(在您的 /etc/exim/passwd.client 中):

*.mailgun.org:username:password

相关内容