I think the cron email vanishes to nothingness because the error raised by
the delivery to dev/null is eaten by the exception clause.

So it "looks" like a sucessful delivery and is essentially eaten. but not
really.

If I remember right from long ago, the reason a delivery to dev/null doesn't
work is because of file ownerships and so on - a file like /dev/null COULD
be treated like a mbox file, but the ownership is wrong, which courier
doesn't like - not 100% sure on this - going from memory of an old old
discussion.

m/

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of dick
hoogendijk
Sent: Monday, December 22, 2003 12:59 PM
To: [EMAIL PROTECTED]
Subject: Re: [courier-users] How to correctly drop messages in
.mailfilter


On Mon, 22 Dec 2003 14:31:48 -0600 (CST)
Joe Laffey <[EMAIL PROTECTED]> wrote:

> On Mon, 22 Dec 2003, Mirko Zeibig wrote:
>
> > On Sun, Dec 21, 2003 at 09:18:39PM -0500, Eric Livingston wrote:
> > > Simple question, but one I can't seem to find a direct answer to:
> > >
> > > How do you send a message into the abyss using .mailfilter rules?
> > > I use SpamAssassin, and would like to auto-delete messages with
> > > scores over a certain threshold.
> > >
> > > Is "to /dev/null" the best bet, or is there some explicit action?
> > > I've noticed that some other mail processors have "drop" actions
> > > that explicitly kill a message - does maildrop?
> >
> > Hello Eric,
> >
> > I struggled with this as well a while ago, sending mails to
> > /dev/null will not work. Instead I have sth. like this in my
> > .mailfilter: if ( /^X-Spam-Level: \*\*\*\*\*\*\*\*/ )
> > {
> >     EXITCODE=99
> >     exit
> > }
> >
>
> I am wondering why my rule below is still delivering the spam BOTH to
> the Maildir I specify as a cc (to collect spam for bayesian feeding)
> AND to the original user's maildir:
>
>         if ( /^X-Spam-Level:
>         \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/ ){
>                 log "%% Utter spam rejected %%"
>                 cc "/home/mail/spam/Maildir"
>                 EXITCODE=99
>                 exit
>         }
>
> Shouldn't the mailfilter exit and NOT deliver to the default Maildir?
> I see the log message above in the log.

I suppose it should, but I wander WHY delivering to /dev/null does not
work for you.
I have in my ".mailfilter"

-=-

# [EMAIL PROTECTED]
# SpamAssassin client called only if msgsize < 256kB
if ( $SIZE < 262144 )
{
    exception {
        xfilter "/usr/bin/spamc"
    }
}
if ( /^X-Spam-Flag: *YES/ )
{
    exception {
        to "Maildir/.zspam/"
    }
}
if ( /^Subject.*Cron <[EMAIL PROTECTED]>/ )
{
    exception {
        to /dev/null
    }
}

-=-

The cron email vanishes into the nothingness ;-))

--
dick -- http://www.nagual.st/ -- PGP/GnuPG key: F86289CE
++ Running FreeBSD 4.9 ++ Debian GNU/Linux (Woody)
+ Nai tiruvantel ar vayuvantel i Valar tielyanna nu vilja


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to