Re: [exim] rewrite sender based on recipient

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Matthew Newton
Fecha:  
A: a.smith
Cc: exim-users
Asunto: Re: [exim] rewrite sender based on recipient
On Tue, Mar 04, 2014 at 04:57:48PM +0000, a.smith@??? wrote:
> 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?


You need to be very careful doing it of course, but yes.

> 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?


I would check all the conditions are correct in the ACLs (one
recipient, recipient is the correct one, comes from the correct
host, etc) and set an ACL variable, possibly based on a lookup.

Then use the ACL variable in an expansion in your rewrites.

Matthew


--
Matthew Newton, Ph.D. <mcn4@???>

Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp@???>