Re: [exim] Router to save copy of all incoming & outgoing ma…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Gaurav Pruthi
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Router to save copy of all incoming & outgoing mails
I have done it using router.
Here it goes...

ROUTER

backup_mail:
condition = ${if eq {}{${lookup mysql {select <FQEID> from
<EMAIL-TABLE> where <FQEID>="${local_part}@$domain"}}}{no}{yes}}
driver = accept
transport = backup_all
unseen

TRANSPORT:

backup_all:
driver = appendfile
delivery_date_add
envelope_to_add
file = <PATH TO SAVE MAILS>
group = exim
user = exim
mode = 0600

Pls note i m saving mails into MBOX format instead of MAILDIR.


Thanks,
Gaurav Pruthi


On Nov 22, 2007 2:23 PM, W B Hacker <wbh@???> wrote:
> Lasse B. Jensen wrote:
> > Use the global exim filter to save the mails.
>
> A workable method.
>
> But the OP asked about how to do it in *routers*.
>
>
> > This requires a transport
> > configured in the exim.conf. Here is my config:
> >
> > systemfilter:
> >
> > # Exim filter
> > unseen save /path/to/USERNAME/Maildir
> >
> > exim.conf -> transport
> >
> > local_copy_outgoing:
> >    driver = appendfile
> >    delivery_date_add
> >    envelope_to_add
> >    return_path_add
> >    group = USERGROUP
> >    user = USERNAME
> >    mode = 0660
> >    maildir_format = true
> >    create_directory = true

> >
> > Alternately you could add you "spy-account" to bcc on all mails.
> >
> > W B Hacker wrote:
> >> Gaurav Pruthi wrote:
> >>> Hi,
> >>>
> >>> I have seen on the net to create filters to archive copy of all
> >>> incoming and outgoing mails. But how can this be accomplished using
> >>> router in exim. I want to save a copy of all incoming and outgoing
> >>> mails but using a router rather than filters. Kindly help me....
> >>>
> >>> Thanks,
> >>> Gaurav Pruthi
> >>>
> >> Search these archives for 'unseen' in routers (which we use, and have so posted)
> >> and - ISTR 'shadow delivery' - which we haven't yet looked at.
> >>
> >> Keep in mind that acl's, routers, and transports need to 'fit' the overall
> >> environment, variable & file use and target philosophy.
> >>
> >> Direct cut and paste may sometimes work - but usually at least modest
> >> modification is needed.
> >>
> >> Bill
> >>
> >>
> >
>
>
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>




--
Gaurav Pruthi