Re: [Exim] Why is $recipients forbidden ?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Miquel van Smoorenburg
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] Why is $recipients forbidden ?
On Wed, 15 May 2002, Miquel van Smoorenburg wrote:

> I wanted to use the $recipients expansion variable, but it is
> forbidden outside of the system filter "to prevent exposure of Bcc
> recipients to ordinary users".
>
> Is it so that if a delivery is made to multiple local users, that
> $recipients as it is now would contain all of those users when
> the user-filter is run? In that case, it makes a bit of sense.


Yes.

> But wouldn't it be a good idea to lift this restriction when
> a transport is run ? That way, I could do something like:
>
>    headers_add = "Envelope-to: ${sg{$recipients}{, }{,\n }}\n"

>
> in a local transport. This is for storing all messages for a
> domain in a maildir mailstore, *after* alias processing etc.
> By using the standard envelope_to, I'd get the addresses before
> alias processing, but that's not quite what I want.


But $recipients contains *all* the recipients for a message, not just
those recipients that apply to a single run of the transport. And it
contains the envelope-to addresses.

> I'm assuming here that $recipients at local-transport-time is
> just the list of addresses passed to that transport, right ?


$recipients at transport time doesn't exist. So you can't make any
assumptions about it! :-)

You can get what you want by storing the message in BSMTP format, but
maybe that isn't suitable for you. However, I wouldn't recomment using
"Envelope-To" for data that isn't envelope data. That's confusing.

One possibility is to make use of headers_add on your aliasing routers
(which will be easier in Exim 4 than in Exim 3), though it might mean
you end up with multiple copies of the added header.


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.