[exim] Rewriting incoming from addresses

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Ben Wheare
Data:  
Para: exim-users
Assunto: [exim] Rewriting incoming from addresses
Hi,

I am currently trying to implement exim with an LDAP backend.

What I'm looking to do is the following:

Every user has a local email address {mailLocalAddress}@domain, which is
looked up through LDAP, and delivered to the corresponding uid. Each
user can have many mailLocalAddresses (e.g. joe.bloggs and joebloggs).

There is another *optional* LDAP property, mailRoutingAddress, which, if
set, redirects all emails to that user, to the given external address
(e.g. joebloggs@anotherdomain). Each user will only have one
mailRoutingAddress.

That all works fine.

However, what I want to do, is make it so that if an email arrives
addressed to a local user, and its from one of the mailRoutingAddresses,
I want it to be rewrote to the first attribute returned by mailLocalAddress.

That is, if joebloggs@anotherdomain sent an email to someoneelse@domain,
I want Exim to rewrite their from address to joe.bloggs@domain before it
arrives in someoneelse's inbox.

Is there anyway I can do this using the rewrite functions of Exim,
without getting it stuck in an infinite loop.

Thanks,

Ben