6 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] if/else problems
FromSent OnAttachments
Charles J. BoeningMar 17, 2002 7:11 pm 
Charlie WattsMar 17, 2002 7:58 pm 
Charles J. BoeningMar 17, 2002 8:21 pm 
Charlie WattsMar 17, 2002 8:38 pm 
Charles J. BoeningMar 17, 2002 8:46 pm 
Mark WeinemMar 19, 2002 11:06 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] if/else problemsActions...
From:Mark Weinem (mark@uni-duisburg.de)
Date:Mar 19, 2002 11:06:45 am
List:net.sourceforge.lists.courier-maildrop

On Sun, 17 Mar 2002, Charles J. Boening wrote:

I want to add a test for "X-Spam-Flag: YES" in the header. That brings me to the following:

import EXT import HOST

if($SIZE < 262144) { xfilter "/usr/bin/spamc -p 1783 -f -u $EXT@$HOST" }

if ( /^X-Spam-Flag: YES/ ) { to "./Maildir/.SPAM/" } else { to "./Maildir/" }

That generates the following error (message never delivered): delivery 5416: success: mailfilter(13):_Syntax_error./did_0+0+1/

Line 13 is the "else" statement.

Sorry, don't know anything about spamassassin.

But the else part should work.

I did this test using reformail:

if($SIZE > 262144) { xfilter "reformail -A'X-Spam-Flag: YES'" }

if ( /^X-Spam-Flag: YES/ ) { to "./Mail/.SPAM/" } else { xfilter "reformail -A'X-Test: Else works'" to "./Mail/tests/" }

Maildrop 1.3.7, invoked by getmail (fetchmail like mail retriever)

Messages bigger than 262144 bytes are delivered to the ./Mail/.SPAM Maildir (and get the X-Spam-Flag Header line).

The rest gets "X-Test: Else works" and is delivered to .Mail/tests Maildir. Works for me.

If I take the else out and leave just the to "./Maildir/" everything goes to the to "./Maildir/.SPAM/" folder.

Because with your "if (SIZE < 262144)" every message *smaller* than 262144 bytes will be tagged as Spam. Is this for testing?

Any ideas are greatly appreciated.

Does maildrop know your DEFAULT Mailbox?

Greetings, Mark