[Exim] Re: Outgoing messages and dumb filter question

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: David Bravo, Jason J. Horton, Andrew D
CC: exim-users
Old-Topics: Re: [Exim] dumb filter question
Subject: [Exim] Re: Outgoing messages and dumb filter question
On Tue, 24 Oct 2000, David Bravo wrote:

> I've got one intranet SMTP server, and i'd like to save all outgoing messages
> (emails to internet) in a folder (each file for each mail). How can i do it?


Make use of a system filter. As in this other posting:

On Tue, 24 Oct 2000, Jason J. Horton wrote:

> My boss wants all email from and all email to a certain email address
> to be logged to a file somewhere for archival purposes. Sounds simple
> enough, right? I am figuring I could do this with a system filter like so:
> # Exim filter
> if $message_headers contains "(test|Test)@domain.com" then
>         logfile /var/log/exim_filterlog 
>         logwrite "$tod_log $message_id message-copy \ 
>         $sender_address ($sender_host_name[$sender_host_address]) \ 
>         => $recipients (recipients=$recipients_count) \ 
>         subject=$header_subject" 
>         save /mail/spool/domain.com/test.copy 0600
>         save /mail/archive/domain.com/test 0600
> endif

>
> This does not seem to work. No log message gets written to
> /var/log/exim_filterlog, no copy of incoming or outgoing messages
> gets placed in /mail/spool/domain.com/test.copy or
> /mail/archive/domain.com/test, but the message does get delivered
> to the correct mail spool (/mail/spool/domain.com/test)


(1) Try running a delivery with -d11 set to get the filter debugging
information.
(2) You need "unseen save" rather than "save", as otherwise the message
won't get delivered normally.
(3) Make sure the files all all writeable by the Exim user.

On Wed, 25 Oct 2000, Andrew D wrote:

> you are trying to use a regex which only the 'match' command can do
> RTFM


That is also true! I hadn't spotted that one.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.