1

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.

first.last@example.com
fir.stl.ast@example.com
f.i.r.s.t.l.a.s.t+label@example.com

are all delivered to firstlast@example.com, 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 first.last@example.com if that's what they select.

  • See the various local_part settings of a router. There is probably some way to do this. – Zoredache Sep 4 '15 at 18:06
  • 1
    Its a matter of rewrite mechanism. You can refer to the chapter 31 of exim' spec, there is few interesting examples there. Heavy regex voodoo it should be... – Kondybas Sep 4 '15 at 19:03
1

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.

dot_local:
  driver = accept
  domains = +local_domains
  local_part_suffix = .*
  check_local_user
  transport = LOCAL_DELIVERY

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 with data = ${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.

gmail_local:
  debug_print       = "R: gmail_local for $local_part@$domain"
  driver            = redirect
  domains           = +local_domains
  data              = ${sg{$local_part}{[.]}{}}@$domain

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.

| improve this answer | |
  • 1
    Google simply strips any dots in the leading part for delivery - look at the first reason on this help page: support.google.com/mail/answer/10313. You really can just put dots anywhere. – Iain Hallam Sep 5 '15 at 13:05
  • @IainHallam I've added a router definition that should do what you want. The original option can be modified to add the '+.,..' functionality that Google allows. – BillThor Sep 6 '15 at 4:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.