我已经为我们自己的域名domain.com设置了Gmail应用程序帐户,这样电子邮件就由Gmail来处理。 即MXlogging指向谷歌服务器,Alogging到我们自己的服务器IP。 这工作正常。
现在我尝试从我们的机器 (通过crontab ,使用Debian的exim4 ) 发送电子邮件到我们自己的电子邮件地址 ,例如[email protected] 。
这不起作用。 据推测,exim将地址视为本地,并无法将其转发到谷歌服务器。 交货失败:
Subject: Mail delivery failed: returning message to sender This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: [email protected] Unrouteable address
然后无用地传送到/var/mail 。
发送到其他地址的电子邮件 – domain.com以外 – 工作正常。
我查看了/etc/exim4/conf.d/下的configuration/etc/exim4/conf.d/但无法理解它。
任何帮助是受欢迎的。 干杯!
我通过在.ifdef DCconfig_internet块内创build一个新的路由器来解决这个问题:
my_domain: debug_print = "R: dnslookup for $local_part@$domain" driver = dnslookup domains = domain.com transport = remote_smtp # ignore private rfc1918 and APIPA addresses ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\ 172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\ 255.255.255.255 no_more
这迫使远程交付(通过标准的dnslookup)甚至*@domain.com地址,这正是我想要的。
通过修改现有的路由器,可能有一个更简单的方法来实现这一点,但这个“为我工作”。
域domain.com无效或DNS设置不正确。 它甚至可以解决私有地址空间中的IP。 当你编辑真正的领域,没有更多的信息,我们可以提供。