Re: [exim] rewrite sender based on recipient

Top Page
Delete this message
Reply to this message
Author: a.smith
Date:  
To: exim-users, Matthew Newton
Subject: Re: [exim] rewrite sender based on recipient
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}


And I've updated my rewrite:

* "${if def:acl_m_a{$acl_m_a} fail}"

But it's not doing any rewrite. I suspect the main issue is that the
ACL isn't matching $recipients to the data in my eximrw.conf file.
Anyway I can't seem to find any info on what the contents of
$recipients looks like so I can't be sure I am searching for the right
string. Can I make exim echo a varibale to the log so I can see what's
in it?

thanks, Andy.