我已经为域的自动回复定义了一个路由器,以便向发送者发送一条消息,告知该域将被删除。
目标:每个发送电子邮件到[电子邮件保护]应该会收到一封邮件,提示 aaa.com 将被删除。
这是我的相关配置:
domainlist relay_to_domains = /etc/exim/domains
begin routers
vacation_router:
driver = redirect
data = ${lookup{$domain}lsearch{/etc/exim/domains}}
domains = +relay_to_domains : sig.hu
reply_transport = vacation_transport
no_more
begin transports
vacation_transport:
driver = autoreply
to = ${reply_address}
from = ${local_part}@${domain}
subject = Re: $h_subject:
text = "autoreply"
/etc/exim/domains 包含:
[email protected]
*@aaa.com
我已经测试了路由[电子邮件保护]
Address testing: uid=0 gid=93 euid=0 egid=93
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing [email protected]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering [email protected]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing [email protected]
--------> vacation_router router <--------
local_part=g domain=aaa.com
checking domains
aaa.com in "/etc/exim/domains"? no (end of list)
aaa.com in "+relay_to_domains : aaa.com"? yes (matched "aaa.com")
calling vacation_router router
rda_interpret (string): ${lookup{$domain}lsearch{/etc/exim/domains}}
search_open: lsearch "/etc/exim/domains"
search_find: file="/etc/exim/domains"
key="aaa.com" partial=-1 affix=NULL starflags=0
LRU list:
:/etc/exim/domains
End
internal_search_find: file="/etc/exim/domains"
type=lsearch key="aaa.com"
file lookup required for aaa.com
in /etc/exim/domains
lookup failed
expanded:
file is not a filter file
parse_forward_list:
vacation_router router declined for [email protected]
"more" is false: skipping remaining routers
no more routers
[email protected] is undeliverable: Unrouteable address
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=59959 (main) terminating with rc=2 >>>>>>>>>>>>>>>>
为什么会被拒绝?如果relay_to_domains匹配,为什么不匹配?有什么解决办法?文档根本没有帮助。
谢谢你的帮助,彼得
答案1
/etc/exim/domains
尝试如下文件内容(添加:是):
[email protected]: yes
[email protected]: yes
如果您想使用通配符:*@aaa.com
那么请不要使用lsearch
,而是尝试nwildlsearch
或其他类型来搜索通配符
有一个例子来源让 exim 向外部递送本地邮件