【问题标题】:"Unrouteable address" with exim4exim4 的“无法路由的地址”
【发布时间】:2013-06-27 19:28:06
【问题描述】:

我正在使用 exim4。我有一个带有联系表格的 Wordpress 安装。我的主机名 -f 是 mydomain.com。

表单正在向 info@mydomain.com 发送电子邮件。但是它永远不会到达我的“场外”电子邮件。我该如何设置才能使电子邮件不会卡在网络服务器上?

Exim 应将电子邮件转发(路由)到场外电子邮件 info@mydomain.com。例如,当我从 gmail 发送到该地址时,它会立即送达。

我已遵循此指南:https://library.linode.com/email/exim/send-only-mta-debian-6-squeeze,但它对解决此问题没有帮助。

mydomain:/var/mail# exim -bt -d info@mydomain.com 2>&1
Exim version 4.80 uid=0 gid=0 pid=23864 D=fbb95cfd
Berkeley DB: Berkeley DB 5.1.29: (October 25, 2011)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DKIM
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
Compiler: GCC [4.7.2]
Library version: GnuTLS: Compile: 2.12.20
                         Runtime: 2.12.20
Library version: PCRE: Compile: 8.31
                       Runtime: 8.30 2012-02-04
Total 13 lookups
WHITELIST_D_MACROS: "OUTGOING"
TRUSTED_CONFIG_LIST: "/etc/exim4/trusted_configs"
changed uid/gid: forcing real = effective
  uid=0 gid=0 pid=23864
  auxiliary group list: <none>
seeking password data for user "uucp": cache not available
getpwnam() succeeded uid=10 gid=10
changed uid/gid: calling tls_validate_require_cipher
  uid=106 gid=109 pid=23865
  auxiliary group list: <none>
tls_validate_require_cipher child 23865 ended: status=0x0
configuration file is /var/lib/exim4/config.autogenerated
log selectors = 00000ffc 00612001
trusted user
admin user
seeking password data for user "mail": cache not available
getpwnam() succeeded uid=8 gid=8
user name "root" extracted from gecos field "root"
originator: uid=0 gid=0 login=root name=root
sender address = root@mydomain.com
Address testing: uid=0 gid=109 euid=0 egid=109
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing info@mydomain.com
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering info@mydomain.com
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing info@mydomain.com
--------> hubbed_hosts router <--------
local_part=info domain=mydomain.com
checking domains
expansion of "${if exists{/etc/exim4/hubbed_hosts}{partial-lsearch;/etc/exim4/hubbed_hosts}fail}" forced failure: assume not in this list
hubbed_hosts router skipped: domains mismatch
--------> dnslookup_relay_to_domains router <--------
local_part=info domain=mydomain.com
checking domains
mydomain.com in "@:localhost:localhost:localhost.localdomain:mydomain.com"? yes (matched "@")
mydomain.com in "! +local_domains : +relay_to_domains"? no (matched "! +local_domains")
dnslookup_relay_to_domains router skipped: domains mismatch
--------> dnslookup router <--------
local_part=info domain=mydomain.com
checking domains
cached yes match for +local_domains
cached lookup data = NULL
mydomain.com in "! +local_domains"? no (matched "! +local_domains" - cached)
dnslookup router skipped: domains mismatch
--------> real_local router <--------
local_part=info domain=mydomain.com
real_local router skipped: prefix mismatch
--------> system_aliases router <--------
local_part=info domain=mydomain.com
checking domains
cached yes match for +local_domains
cached lookup data = NULL
mydomain.com in "+local_domains"? yes (matched "+local_domains" - cached)
R: system_aliases for info@mydomain.com
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
  key="info" partial=-1 affix=NULL starflags=0
LRU list:
  7/etc/aliases
  End
internal_search_find: file="/etc/aliases"
  type=lsearch key="info"
file lookup required for info
  in /etc/aliases
lookup failed
expanded:
file is not a filter file
parse_forward_list:
system_aliases router declined for info@mydomain.com
--------> userforward router <--------
local_part=info domain=mydomain.com
checking domains
cached yes match for +local_domains
cached lookup data = NULL
mydomain.com in "+local_domains"? yes (matched "+local_domains" - cached)
checking for local user
seeking password data for user "info": cache not available
getpwnam() returned NULL (user not found)
userforward router skipped: info is not a local user
--------> procmail router <--------
local_part=info domain=mydomain.com
checking domains
cached yes match for +local_domains
cached lookup data = NULL
mydomain.com in "+local_domains"? yes (matched "+local_domains" - cached)
checking for local user
seeking password data for user "info": using cached result
getpwnam() returned NULL (user not found)
procmail router skipped: info is not a local user
--------> maildrop router <--------
local_part=info domain=mydomain.com
checking domains
cached yes match for +local_domains
cached lookup data = NULL
mydomain.com in "+local_domains"? yes (matched "+local_domains" - cached)
checking for local user
seeking password data for user "info": using cached result
getpwnam() returned NULL (user not found)
maildrop router skipped: info is not a local user
--------> lowuid_aliases router <--------
local_part=info domain=mydomain.com
checking domains
cached yes match for +local_domains
cached lookup data = NULL
mydomain.com in "+local_domains"? yes (matched "+local_domains" - cached)
checking for local user
seeking password data for user "info": using cached result
getpwnam() returned NULL (user not found)
lowuid_aliases router skipped: info is not a local user
--------> local_user router <--------
local_part=info domain=mydomain.com
checking domains
cached yes match for +local_domains
cached lookup data = NULL
mydomain.com in "+local_domains"? yes (matched "+local_domains" - cached)
checking local_parts
info in "! root"? yes (end of list)
checking for local user
seeking password data for user "info": using cached result
getpwnam() returned NULL (user not found)
local_user router skipped: info is not a local user
--------> mail4root router <--------
local_part=info domain=mydomain.com
checking domains
cached yes match for +local_domains
cached lookup data = NULL
mydomain.com in "+local_domains"? yes (matched "+local_domains" - cached)
checking local_parts
info in "root"? no (end of list)
mail4root router skipped: local_parts mismatch
no more routers
info@mydomain.com is undeliverable: Unrouteable address
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=23864 terminating with rc=2 >>>>>>>>>>>>>>>>

【问题讨论】:

    标签: exim exim4


    【解决方案1】:

    根据Testing Exim wiki,您可以使用以下方法检查地址的路由:

    exim -bt name@example.org
    

    这将为您提供有关 exim4 是否识别此地址的信息。

    【讨论】:

      【解决方案2】:

      你有没有在你的服务器上试过这个

      回显“测试邮件”。 | mail -s 测试名称@mydomain.com

      还要确保您的主机名是完全合格的域。

      试试

      主机名

      主机名-i

      主机名应该解析或正确指向主机名-i(主IP)显示的IP

      同时检查 mydomain.com 的 MX 记录,并确保它使用本地邮件服务器。

      【讨论】:

      • 谢谢,我会调查的。
      • 不。 127.0.0.1 是本地主机循环 IP。您无法使用此 IP 发送邮件。您的主机名必须是可解析的。它应该指向一个公共 IP。这就是完全限定域名的含义。
      • 嗨@LeoPrince,您有参考资料,我们可以确认hostname -i 应该返回一个公共IP?
      • 我之前的评论是几年前发布的,当时我还是个初学者。我现在想稍微修改一下该评论。 hostname -i 通过解析 DNS 带出 IP。它应该是 FQDN 以使用名称服务器递归解析,或者它应该在 hosts 文件中有一个条目。一些服务器供应商直接在 hosts 文件中提供公共 IP,但有些提供私有 IP,这取决于他们管理的系统的方式。但是我的意思是,hostname -i 应该为您带来可用的解析 IP,无论是来自 hosts 文件(如果有条目)还是来自 DNS .. 希望对您有所帮助
      • 邮件不在所有 exim 主机上,测试应该做什么?
      猜你喜欢
      • 2021-03-26
      • 1970-01-01
      • 2013-03-16
      • 1970-01-01
      • 2016-02-27
      • 1970-01-01
      • 2011-08-31
      • 1970-01-01
      • 2020-04-14
      相关资源
      最近更新 更多