Re: [exim] copy email going to one domain

Top Page
Delete this message
Reply to this message
Author: Yan Seiner
Date:  
To: exim-users
Subject: Re: [exim] copy email going to one domain

On 02/10/2014 02:49 AM, Heiko Schlittermann wrote:
> Yan Seiner <yan@???> (Mo 10 Feb 2014 00:10:08 CET):
>> I would like to keep copies of emails that I send to one particular
>> domain in a separate folder.
> Some simplistic approach could be the use of shadow_transport transport
> option, but this only helps if the transport you use is a local
> transport.
>
> More generic starting point is the use of the redirect router:
>
>      begin routers:

>
>          # order matters! should be one of the first routers
>          cc_to_me:
>              driver = redirect
>              domains = example.com
>              data = $local_part@$domain, me-and-myself@???

>

Here's what I've tried:

         cc_to_me:
             driver = redirect
             domains = xxx.com
             headers_add = "X-cc-to-me: by $primary_hostname on $tod_full"
             data = $local_part@$domain, yan@???


That way I can sort on the header in my .forward file.

That works except in the corner case where I sent email to my work email
and it gets forwarded back to me - both copies end up in the "workSent" box.

I have not figured how to add the header or the cc only to email leaving
my domain, not for email coming in from the outside.