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:
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