我正在尝试将最初发送至 的电子邮件重定向[email protected]
至[email protected]
。
我有aliases
文件:
hello: [email protected]
接下来路由器:
local_router:
driver = accept
domains = +local_domains
local_parts = mrxxx
transport = local_dst
cannot_route_message = Unknown mailbox
no_more
aliases_router:
driver = redirect
data = ${lookup{$local_part}lsearch{/etc/aliases}}
cannot_route_message = Unknown mailbox
allow_defer
allow_fail
no_more
local_dst
运输如下所示:
local_dst:
driver = appendfile
directory = /var/mail/$local_part/Maildir
delivery_date_add
envelope_to_add
return_path_add
maildir_format
mode_fail_narrower = false
根据调试信息,一切都应该正常工作:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing [email protected]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering [email protected]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing [email protected]
--------> local_router router <--------
local_part=hello domain=example.com
checking domains
example.com in "@ : example.com"? yes (matched "example.com")
example.com in "+local_domains"? yes (matched "+local_domains")
checking local_parts
hello in "mrxxx"? no (end of list)
local_router router skipped: local_parts mismatch
--------> aliases_router router <--------
local_part=hello domain=example.com
calling aliases_router router
rda_interpret (string): '${lookup{$local_part}lsearch{/etc/aliases}}'
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
key="hello" partial=-1 affix=NULL starflags=0
LRU list:
2/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="hello"
file lookup required for hello
in /etc/aliases
lookup yielded: [email protected]
expanded: '[email protected]'
file is not a filter file
parse_forward_list: [email protected]
extract item: [email protected]
aliases_router router generated [email protected]
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
routed by aliases_router router
envelope to: [email protected]
transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering [email protected]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing [email protected]
--------> local_router router <--------
local_part=mrxxx domain=example.com
checking domains
example.com in "@ : example.com"? yes (matched "example.com")
example.com in "+local_domains"? yes (matched "+local_domains")
checking local_parts
mrxxx in "mrxxx"? yes (matched "mrxxx")
calling local_router router
local_router router called for [email protected]
domain = example.com
set transport local_dst
queued for local_dst transport: local_part = mrxxx
domain = example.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by local_router router
envelope to: [email protected]
transport: local_dst
[email protected]
<-- [email protected]
router = local_router, transport = local_dst
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=16 (main) terminating with rc=0 >>>>>>>>>>>>>>>>
但是电子邮件被拒绝:
2020-03-08 21:24:20.079 [14] H=mail-oi1-f173.google.com [209.85.167.173]:43081 I=[192.168.144.7]:25 X=TLS1.3:TLS_AES_128_GCM_SHA256:128 CV=no SNI="mail.example.com" F=<[email protected]> rejected RCPT <[email protected]>: Unrouteable address
有任何想法吗?
# exim --version
Exim version 4.93 #3 built 18-Dec-2019 19:58:53
...
编辑:
在调试模式下运行exim
守护进程显示了有点不同的图片,似乎我的aliases_router
被跳过了并且它继续在路由器中进行收件人验证dnslookup
???
13 sender [email protected] verified ok
13 require: condition test succeeded in ACL "acl_check_rcpt"
13 processing "accept" (/etc/exim/exim.conf 470)
13 check hosts = +relay_from_hosts
13 host in ""? no (end of list)
13 host in "+relay_from_hosts"? no (end of list)
13 accept: condition test failed in ACL "acl_check_rcpt"
13 processing "accept" (/etc/exim/exim.conf 479)
13 check authenticated = *
13 accept: condition test failed in ACL "acl_check_rcpt"
13 processing "require" (/etc/exim/exim.conf 485)
13 message: nice hosts say HELO first
13 check condition = ${if def:sender_helo_name}
13 = true
13 require: condition test succeeded in ACL "acl_check_rcpt"
13 processing "require" (/etc/exim/exim.conf 492)
13 message: relay not permitted
13 check domains = +local_domains : +relay_to_domains
13 cached yes match for +local_domains
13 cached lookup data = NULL
13 example.com in "+local_domains : +relay_to_domains"? yes (matched "+local_domains" - cached)
13 require: condition test succeeded in ACL "acl_check_rcpt"
13 processing "require" (/etc/exim/exim.conf 501)
13 check verify = recipient
13 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
13 Verifying [email protected]
13 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
13 Considering [email protected]
13 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
13 routing [email protected]
13 --------> local_router router <--------
13 local_part=hello domain=example.com
13 checking domains
13 cached yes match for +local_domains
13 cached lookup data = NULL
13 example.com in "+local_domains"? yes (matched "+local_domains" - cached)
13 checking local_parts
13 hello in "mrxxx"? no (end of list)
13 local_router router skipped: local_parts mismatch
13 --------> aliases_router router <--------
13 local_part=hello domain=example.com
13 aliases_router router skipped: verify 2 0 0
13 --------> dnslookup router <--------
13 local_part=hello domain=example.com
13 checking domains
13 cached yes match for +local_domains
13 cached lookup data = NULL
13 example.com in "! +local_domains"? no (matched "! +local_domains" - cached)
13 dnslookup router skipped: domains mismatch
13 no more routers
13 ----------- end verify ------------
13 require: condition test failed in ACL "acl_check_rcpt"
答案1
我的正确设置aliases_router
如下(基本上是从 Exim 复制粘贴的文档):
aliases_router:
driver = redirect
data = ${lookup{$local_part}lsearch{/etc/aliases}}
cannot_route_message = Unknown mailbox
我不知道为什么(正如评论中提到的)在这里出现了恶意设置。no_more
并且似乎没有阻止任何东西,因为这些仅用于启用 Exim 过滤器中的某些功能。no_verify
allow_defer
allow_fail
no_more
如果您对设置有任何解释no_verify
,请发表评论或发表答案,我会很乐意接受。