Re: [exim] Trouble with $recipients

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Magnus Holmgren
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Trouble with $recipients
On Wednesday 05 September 2007 16:33, bug123 wrote:
> I have the following acl:
>
> acl_check_data:
> warn set acl_c1 = $recipients
> warn log_message = $acl_c1 check_data
> accept
>
> Which according to the logs works fine:
>
> 2007-09-05 17:26:42 1ISvq6-0002Nf-0R U=root Warning: paaunl@???,
> somethingelse@??? check_data
>
> But in my rewrite rule $acl_c1 always resolves to an empty string, no
> matter what I try.


See http://www.exim.org/exim-html-4.50/doc/html/spec_toc.html#TOC236: "all the
rewriting is completed before the DATA ACL and local_scan() functions are
run.". Try setting the acl variable in the *predata* ACL.

You could also try modifying the return path and From: field using errors_to,
headers_add, and headers_remove in a router, thereby separating messages to
different recipients as needed. It's more manual WRT the the address
rewriting, but you don't have to mess with $recipients at all.

You could further try setting errors_to only, and then use headers_rewrite in
the transport to rewrite the addresses in the header based on $return_path.

As a side note, a per-message ACL variable should be more appropriate.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans