[Exim] exim-4 "plus" addressing with aliases

Etusivu
Poista viesti
Vastaa
Lähettäjä: Oliver Eikemeier
Päiväys:  
Vastaanottaja: exim-users
Aihe: [Exim] exim-4 "plus" addressing with aliases
This is a cryptographically signed message in MIME format.
--
Hi all,

I'm trying to get "plus" addressing (a message to user+Box will be
delivered to the IMAP mailbox user.Box instead of user.INBOX) to work
with aliases.

When I use a simple alias file (actually in LDAP):

a.user: user
bounce: :fail: no such user here
friend: my.friend@???

and a simple query:

aliases_router:
driver = redirect
allow_fail
data = ${lookup ldap {_query_} {$value}fail}

everything works, but a message to a.user+Box will be delivered to
user.INBOX

So I use:

aliases_router:
   driver = redirect
   allow_fail
   caseful_local_part
   local_part_suffix = +*
   local_part_suffix_optional
   data = ${lookup ldap {_query_} \
            {${if eq {${local_part:$value}}{} {$value} \
            {${local_part:$value}$local_part_suffix${if eq
{${domain:$value}}{} {}{@${domain:$value}}}} } }fail}


To get:

a.user+Box
=> user+Box

bounce+Box
=> :fail: no such user here

friend+Box
=> my.friend+Box@???

Is there a simpler way to do this or does the expression have to be
*that* complicated?

Thanks for any suggestions,
     Oliver
--
Content-Description: S/MIME Cryptographic Signature


[ smime.p7s of type application/x-pkcs7-signature deleted ]
--