我有以下正在运行的 Exim4 路由器:
dovecot_user:
driver = accept
condition = ${lookup mysql{SELECT CONCAT(mailboxes.local_part,'@',domains.fqdn) AS goto FROM domains,mailboxes WHERE \
mailboxes.local_part='${quote_mysql:$local_part}' AND \
mailboxes.active=1 AND \
mailboxes.domain_id=domains.id AND \
domains.fqdn='${quote_mysql:$domain}' AND \
domains.active=1}{yes}{no}}
transport = dovecot_delivery
我想对其进行修改,以便它可以接受表单的地址(然后将其发送到收件crm-bounce
箱):
[email protected]
[email protected]
我知道以下 SQL 可以从测试数据库中正确选择:
SELECT * FROM regexptest.test WHERE email REGEXP '^crm-bounce([\+].*)?$';
我修改了以下行:
mailboxes.local_part='${quote_mysql:$local_part}' AND \
内容如下:
mailboxes.local_part REGEXP '^${quote_mysql:$local_part}([\+].*)?\$' AND \
但当我跑步时我得到exim -bt [email protected]
undeliverable: Unrouteable address
答案1
看来我做错了。我需要在路由器中启用 local_part_suffix,方法是添加:
local_part_suffix = +*
local_part_suffix_optional