Re: [Exim] Routing with Spamcop

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Mark Edwards
CC: Matthew Byng-Maddick, exim list
Subject: Re: [Exim] Routing with Spamcop
On Thu, 1 Aug 2002, Mark Edwards wrote:

> One more question regarding this setup. I have a system filter that
> makes a backup of all messages:
>
>
> # 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

>
>
> This backup copy does not contain the X-Warning: headers that get
> assigned in my ACL if hosts are in the blacklist.


... but the other copies do? That is inexplicable, because headers added
by ACLs are put into the message when it is received and put on Exim's
spool. The reception process then ends.

The filter is run during a subsequent delivery process, and it must
perforce operate on the same copy of the message for all recipients.

> Is there a way to
> have this functionality occur after the X-Warning: header is added?
> Presumably system filters are processed before the ACL.


No. Quite the reverse. ACLs run during reception; filters run during
delivery.

So, how to figure out what's going on? One thing you could do is to run
with queue_only set for a short time so that all messages end up on the
queue without being delivered. Then you can inspect the contents of the
-H files by hand, and verify that the X-Warning: headers are present
when they should be.

Another possibility is to use "logfile" and "logwrite" in the system
filter to log when a message has the header.

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