Re: [exim] rewrite sender based on recipient

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Matthew Newton
Dátum:  
Címzett: a.smith
CC: exim-users
Tárgy: Re: [exim] rewrite sender based on recipient
On Wed, Mar 05, 2014 at 06:21:15PM +0000, a.smith@??? wrote:
> Sorry I'm struggling with some basics here, Im using Exim on Debian
> with the split out config.


You're probably on your own with this one... you'll need to find
the right places to put stuff (or run a normal config instead).

> Currently my ACL looks like:
>
> acl_check_recipient:
> accept
>      hosts = *
>         log_message = The value of recipients is $recipients
>         set acl_c_a =
> ${lookup{$recipients}lsearch{/usr/local/scripts/eximrw.conf}\
>          {$value}fail}


Not $recipients - use $local_part@$domain


> Im not getting the log message in the mainlog so I assume its not
> being processed.


I just tested it here, and it works fine. Watch you put the new
ACL stanza before any lines that accept, e.g. everything from
localhost, to make sure you're actually hitting it.

in the rcpt ACL:

  warn
    set acl_m_rp = ${lookup{$local_part@$domain}lsearch{/tmp/list}{$value}fail}


in rewrite:

* "${if def:acl_m_rp {$acl_m_rp} fail}" Ff

in /tmp/list:

recipient@???: newsender@???

correctly rewrites the sender address when sent to
"recipient@???".

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