If my users have usernames of the form firstlast
within my example.com
domain, is there a way to get exim to correctly deliver to them whatever the number of dots put into the address? This is a feature that Gmail has.
[email protected]
[email protected]
[email protected]
are all delivered to [email protected]
, the last with its tag preserved for filtering.
Ideally, I'd like to be able to normalise outgoing email from these users to have the form of dots that they select (also a feature of Gmail) so that their mail will always appear to come from [email protected] if that's what they select.
I didn't know Google allows you to split your name just anywhere. The following should allow the users to place any suffix they desire after their userid which is relatively commonly done. Gmail seems to allow a plus sign instead of a dot.
Exim should already lookup up outgoing email address aliases in
/etc/email-addresses
. Either add the user's preferred address to this file, or build your own rewrite mechanism based on the existing rewrite rule.To remove all dots from the address try replacing
local_part_suffix = .*
in the above router withdata = ${sg{$local_part}{[.]}{}}@$domain
. This should attempt local deliver of the address with all dots removed. This variation of one of my routers should also work.If you want both functions I believe you will need to use
driver = redirect
in at least one router, or combine both functionalities into a single router.