recipient delimiter translation with exim
Gedalya
gedalya at gedalya.net
Fri Apr 22 10:44:35 UTC 2016
In case anyone is interested:
Say I want to allow multiple recipient delimiters, possibly more than one character long, and dovecot is configured to use the + sign.
In my case I decided to also allow the following: ".-" "__" and ".."
My last router in exim is mysql_user and the one before that is mysql_alias. I added the following before mysql_alias:
suffix_translate:
debug_print = "R: suffix_translate for $local_part@$domain"
driver = redirect
domains = +virtual_domains
local_part_suffix = .-* : __* : ..*
data = ${quote_local_part:$local_part${sg{$local_part_suffix}{\N^(\.-|__|\.\.)\N}{+}}}@$domain
# the following is an "optimization" or just a way to make the debug output less tedious. It prevents
# exim from going all the way back to the first router with the new address
redirect_router = mysql_alias
In the dovecot_lmtp transport, I added the rcpt_include_affixes option.
With LDA, use the -a flag as follows:
-a $local_part$local_part_suffix@$domain
With LMTP, using the envelope_to_add option and configuring dovecot to use it with the lda_original_recipient_header option, I get an Envelope-To header populated with the original recipient, and dovecot uses that one for some reason. See my other message posted on this list.
More information about the dovecot
mailing list