[exim] rewrite sender based on recipient

Etusivu
Poista viesti
Vastaa
Lähettäjä: a.smith
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] rewrite sender based on recipient
Hi list,

I'd like to be able to rewrite the sender address for outbound mail
based upon the address to which the mail is being sent. If we can
imagine that the recipient will always be a single email address. Is
this possible?
I've tried the following:

*       ${lookup{$recipients}lsearch{/usr/local/scripts/eximrw.conf}\
         {$value}fail} Ffrs


But it says "unknown variable name "recipients""

The reason being is that I need to filter mail from an application
which always sends from the same user so that it appears to be from
different users depending upon the "to" address.

Any suggestions?

thanks in advance, Andy.