[Exim] test for RCPT TO: in user filter?

Top Pagina
Delete this message
Reply to this message
Auteur: Bernd Meurer
Datum:  
Aan: exim-users
Onderwerp: [Exim] test for RCPT TO: in user filter?
Hi all,

I just switched from sendmail to exim, please excuse if this question
is a FAQ (though I did RTFM, but didn't succeed finding an answer)

As suggested in A0409, I configured exim to receive mail for any local
part at some virtual domain and to deliver it to a single local user:

virtual:
driver = redirect
data = ${lookup{$domain}lsearch{/etc/virtual}}

domain1: local_user
domain2: local_user

I set up a user filter for this receiving local user. The point is that
I am not sure how to test whithin that filter to which address the mail
originaly was sent to.
On putting the mail into local user's mailbox, exim seems to prepend a
"Envelope-to:" header. Great I thought, all I have to test for is
if $h_envelope-to: contains "rcpt@???" then ...
but it wouldn't work.
I also tried $h_received_for:, but this didn't do the trick either.
My work around for now is
if $h_received: contains "for rcpt@???;"
which is working, but doesn't look very elegant for me. Isn't there a
variable which contains the original "RCPTO TO" when exim received the
mail in the first place?

Thank you for your help,

Bernd





--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net