您好我有一个问题,当我想在exim中使用智能主机方法发送邮件,并使用Mailgun作为中继的SMTP服务器。
这是我的configuration
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
有人可以帮我解决这个问题?
本页说明如何使用mailgunconfigurationexim。 您需要安装中继主机和SMTPauthentication,让mailgun接受您的电子邮件。
在exim.conf和路由configuration中:
# 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
另外请确保configurationlogin凭据(在/etc/exim/passwd.client中):
*.mailgun.org:username:password