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:Charlie Watts (cewa@frontier.net)
Date:Mar 17, 2002 7:58:42 pm
List:net.sourceforge.lists.courier-maildrop

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

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/

I've had weird troubles, but not investigated, with maildrop liking different syntax in different places.

I'm not sure if this will help -

Here's an abbreviated version of my /etc/maildroprc. I use the "exception" clauses so maildrop will continue if the xfilter or deliver commands fail.

# REFORMAIL is a utility that comes with Maildrop. REFORMAIL="/usr/local/bin/reformail"

# Only scan stuff under 256KB # If the spamd daemon dies, just deliver it ... (that's what 'exception' does) # I figure that spamc has 256K limiting too ... but maildrop already knows the
message # size, and this way we can sometimes avoid a fork ...

if ( $SIZE < 262144 ) { # Stick the final recipient into the headers

# Strange maildrop syntax: Sometimes it wants the braces like this, # sometimes on the next line.

exception { xfilter "$REFORMAIL -i'Delivered-To: $LOGNAME'" }

exception { xfilter "/usr/bin/spamc -f -d backup.frontier.net" }

if ( /^X-Spam-Flag: YES$/ ) { # If the "Spam" folder exists, save tagged mail there. Otherwise
bail. exception { to "./.Spam/." } } }