Re: [exim] List of recipients

Top Page
Delete this message
Reply to this message
Author: Kjetil Torgrim Homme
Date:  
To: Marilyn Davis
CC: exim-users, Andrew Johnson
Subject: Re: [exim] List of recipients
On Thu, 2005-04-07 at 14:04 -0700, Marilyn Davis wrote:
> On Thu, 7 Apr 2005, Andrew Johnson wrote:
>
> > Is there any way of getting a full list of recipients of an email (after
> > routers have been processed for alias expansion and redirection) ?
>
> If, in the acl you name as your acl_smtp_rcpt you put:
>
> warn set acl_m0 = $acl_m0 $local_part@$domain
>
> this will collect the addresses into $acl_m0, which is available
> through the reception process and is available to routers, transports
> and filters.


this already exists in $recipients, but it won't help the OP since he
wants the list _after_ routing.

you can collect all recipients by setting address_data in the first
router. this comment may be useful:

# ph10's recommended way of writing a non-routing router: "Use a
# redirect router that redirects to the same address; set the
# redirect_router option to point to the next router."
# If we only need to set "address_data", we can cheat and set "data"
# to the empty string. The router will decline, but that's fine.

this may cause some duplicates in the list unless you write tricky code.

> > I would like to add the full list of actual recipients to an X-Header prior
> > to delivering the email to an archive server.


all routing is finished before running the transports, so I think this
will work fine.
--
Kjetil T.