答案1
begin routers
guids:
driver = redirect
senders = \N^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}@example\.com$\N
data = [email protected]
pipe_transport = address_pipe
. . . . . .
该路由器捕获所有与正则表达式匹配的本地部分的消息并将其重定向到单个地址。
答案2
仅供参考
begin routers
....
regexalias:
driver = redirect
data = ${lookup{$local_part}wildlsearch{/etc/aliases.wildcard}}
/etc/aliases.wildcard
^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12} user
这使得有更多的灵活的不需要重启 exim 的模式