Re: [Exim] How do I filter spam earlier in the delivery?

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Malcolm Ferguson
CC: exim-users
Subject: Re: [Exim] How do I filter spam earlier in the delivery?
On Mon, 26 Nov 2001, Malcolm Ferguson wrote:

> It seems to me that the system filter is applied after Exim has accepted
> a message for delivery. This seems too late in the process - I don't
> want to take responsibility for these messages. I would much rather
> return 550 (or whatever the code is) to the client MTA instead of 220
> and not accept the message at all, and make them deal with error. Is
> there anyway of filtering at this earlier stage?


In Exim 3, no.

In Exim 4, there is more control after the DATA phase of the SMTP input,
but it does not involve running a filter as such. You can either check
the result of an expansion string (which can look at the headers and the
start of the message) or you can write a C function which can inspect
the entire message.

Note that many stupid clients "deal with error" by re-trying later when
it is a 5xx error after the DATA phase. This is in contravention of the
RFC, of course.

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