[Exim] Complex filtering on the body of a message

Góra strony
Delete this message
Reply to this message
Autor: Donald J Bindner
Data:  
Dla: exim-users
Temat: [Exim] Complex filtering on the body of a message
Before I ask my question, I would like to comment that I
have spent some time with the FAQ, manuals, and other web
pages for exim. So there is some chance that my question
is reasonable (or at least there is not anobvious example
to grab).

I would like to write a filter that gives a spam-score to
email based on its content. If the spam-score is low,
I would like the delivery to continue, otherwise I would
like to bounce the mail. The amount of email I need to
filter is small enough that it is practical to examine
entire message bodies.

A 'pipe' command in my .forward seems to be almost exactly
what I want, except that it always assumes the pipe program
will make the actual delivery (a la procmail). But I would
prefer that exim finish the delivery if the spam-score is
low. Adding an 'unseen' is not sufficient because then the
delivery continues even if the pipe program returns an error.

One obvious (to me) solution might be to have another special
return value in addition to the defaults 73 and 75 that provide
for temporary errors; something to indicate that this pipe
command should be considered 'unseen'. Then I could return a
real error value for spams (and create a bounce) and the 'unseen'
value for legitimate emails, for which delivery would continue
according to the remainder of my .forward file normally.

Alternatively, I suppose my pipe program could actually make
the delivery (possibly adding an extra header and passing
the message back to exim). I am afraid I am pretty ignorant here,
and if you think this is the correct solution I would appreciate a
nudge in the right direction. It has the advantage that it could
be implemented with my current version of exim.

--
Don Bindner <dbindner@???>