Re: [Exim] bogofilter - Exim filter help needed

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: John (TJ) Penton
Ημερομηνία:  
Προς: Brandon Martus
Υ/ο: exim-users
Καινούρια Θέματα: [Exim] Success!! Autoreply, aliasing, AND local delivery from mysql DB!
Αντικείμενο: Re: [Exim] bogofilter - Exim filter help needed
On Wed, 20 Nov 2002, Brandon Martus wrote:

> I have my Exim filter file set up as follows:
>
> Now, Exim does run incoming mail through the 'else' clause, and adds this
> header:
> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.8.0
>
> BUT -- the mail is then bounced, and thats where the problem is ..
> I've tried adding " > /dev/null 2>&1" to the end of the command, to
> surpress the output
> but that doesn't make sense .. because the mail has to be modified (w/new
> header) and then
> sent to the correct mailbox.
>
> Anyway, any help would be greatly appreciated.
> Below is the bounced e-mail, so you can see whats happening on that end..
>
> Is there something I have to add to my Exim filter?


You seem to have misunderstood what "pipe" does (my appologies if you have
not). pipe simply takes the message and pipes it to the command given.
It does not take the standard out of that command and then deliver it -
the command itself is responsible for delivering the message. pipe is
often used when mailboxes are managed by a separate system such as an IMAP
daemon - the message is passed to the daemon which then puts it into its
own mailbox system.

If you return a non-zero error code from the command, or anything from
standard out or error, the message will be bounced (as you are seeing).
See the extract below from the exim filter spec:

==begin extract section 15
The command should return a zero completion code if all has gone well.
Most non-zero codes are treated by Exim as indicating a failure of the
pipe. This is treated as a delivery failure, causing the message to be
returned to its sender. However, there are some completion codes which are
treated as temporary errors. The message remains on Exim's spool disc, and
the delivery is tried again later, though it will ultimately time out if
the delivery failures go on too long. The completion codes to which this
applies can be specified by the system administrator; the default values
are 73 and 75.

The pipe command should not normally write anything to its standard output
or standard error file descriptors. If it does, whatever is written is
normally returned to the sender of the message as a delivery error, though
this action can be varied by the system administrator.
==end extract

I do not know what the best way to do what you want (subsequently have
exim deliver the message) is. I suspect you could have your filter pass
the message back to exim for delivery - if anyone knows a better way, they
could enlighten us both.

John

--
Christopher Robin, I've been thinking to myself and what I think is
that these are the -Ow!- wrong sort of bees.