[Exim] filters: two aliases to the same user

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Nathaniel Hekman
Data:  
Para: 'exim-users@exim.org'
Assunto: [Exim] filters: two aliases to the same user
Both foo@??? and bar@??? point to the same user (me). I want
to set up a filter in my .forward file to save mail addressed to foo in one
file and mail to bar in another. I want to do this even if those addresses
are not in the To: or Cc: headers (e.g. if they're Bcc'd or on a mailing
list).

My first attempt was this:

    # Exim filter
    if $original_local_part is foo then save Mail/foo endif
    if $original_local_part is bar then save Mail/bar endif


But the problem I've run into is when mail is addressed to *both* addresses.
("To: foo@???, bar@???", or even "Bcc: foo@???,
bar@???".) In that case I want two copies of the mail, one saved to
Mail/foo and one to Mail/bar. But by the time it gets to my .forward file,
exim has dropped one. I assume it's because it realises both addresses are
aliases for the same account, but I wish it would wait to see what the
.forward file wants to do with them.

What can I do to have exim actually save this mail to both files? Maybe by
making exim send it through my .forward file twice, with a different
$original_local_part, or maybe by listing both addresses in
$original_local_part or in some header...

I can check the To: and Cc: headers, but that won't work if I'm Bcc'd.

Thanks for any help.


Nate

P.S. Nigel, I always check the archives. And the FAQ and the docs.