Re: [exim] copy email going to one domain

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Heiko Schlittermann
Datum:  
To: exim-users
Betreff: Re: [exim] copy email going to one domain
Yan Seiner <yan@???> (Mo 10 Feb 2014 16:17:35 CET):
>
> 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.


There more conditions you can use as a base for routing:

    cc_to_me:
        …
        condition = ${if eq{$sender_address_domain}{seiner.com}}


    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
 gnupg fingerprint: 9288 F17D BBF9 9625 5ABC  285C 26A9 687E 7CBF 764A -
(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B)-