Re: [exim] rewrite sender based on recipient

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Matthew Newton
Date:  
À: a.smith
CC: exim-users
Sujet: Re: [exim] rewrite sender based on recipient
On Wed, Mar 05, 2014 at 01:37:52PM +0000, a.smith@??? wrote:
> Quoting Matthew Newton <mcn4@???>:
>
> >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.
> >
>
> Thanks for the idea Matthew. I've put the following code in to attempt this:
> ACL
>
> acl_check_recipient:
> accept hosts = *
>         set acl_m_a =
> ${lookup{$recipients}lsearch{/usr/local/scripts/eximrw.conf}\
>          {$value}fail}


Try $local_part@$domain instead of $recipients. The ACL only
checks one recipient at a time (which is why you probably also
need to check that $recipients_count is 1, or similar).

See http://exim.org/exim-html-current/doc/html/spec_html/ch-string_expansions.html#SECTexpvar
for the list of available variables - not all are available at the
same time.

Cheers,

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