Re: [Exim] separate archiving for incoming and outgoing?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Odhiambo Washington
Datum:  
To: Mark Edwards
CC: Exim Users
Betreff: Re: [Exim] separate archiving for incoming and outgoing?
* Mark Edwards <mark@???> [20020618 16:47]: wrote:
> I am a relatively new convert to exim from sendmail. I need to maintain a
> running backup of mail sent and received by the server, and I'm using the
> system filter suggested in the FAQ. My question -- is there a way to
> backup mail received for local users separately from mail sent by local
> users? I would like to have copies of incoming mail sent to a user called
> "backup" and copies of outgoing mail sent by local users to a user called
> "sentmail".
>
> Can anyone suggest a way of adding this kind of distinguishing capability
> to my filter?
>
> Here's the filter:
>
> # Exim filter
>
> # Ignore error messages
> if error_message then finish endif
>
>
> # Copy if this is the first delivery attempt
> if first_delivery then
> unseen deliver backup@??? errors_to postmaster@???
> endif
>


I think there is a way....but it means you have to define who local users
are first then act on that....generate a list of local users to a file then
define the two rules like this:

# Backup outgoing

if ${lookup{$sender_address}lsearch{/path/to/local_users}{yes}{no}} is yes then
unseen deliver backup-outgoing@domain
endif


# Backup incoming

if ${lookup{$header_to:}lsearch{/path/to/local_users}{yes}{no}} is yes then
unseen deliver backup-incoming@domain
endif




Just an idea but I feel it may work ;-) Please test before implementing.




-Wash

--
Odhiambo Washington  <wash@???>    "The box said 'Requires
Wananchi Online Ltd.  www.wananchi.com      Windows 95, NT, or better,'
Tel: 254 2 313985-9   Fax: 254 2 313922     so I installed FreeBSD."
GSM: 254 72 743 223   GSM: 254 733 744 121  This sig is McQ!  :-)



It's no surprise that things are so screwed up: everyone that knows how
to run a government is either driving taxicabs or cutting hair.
        -- George Burns