2 messages in net.sourceforge.lists.courier-maildrop[maildropl] Using $MATCH, $MATCH2 int...
FromSent OnAttachments
Jim McConnellFeb 13, 2004 10:16 pm 
Torsten VellerFeb 14, 2004 6:16 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:[maildropl] Using $MATCH, $MATCH2 intelligently?Actions...
From:Jim McConnell (ji@mcconnell.net)
Date:Feb 13, 2004 10:16:38 pm
List:net.sourceforge.lists.courier-maildrop

Hello..

The following is a snippet from my ~/.mailfilters/default file:

FILTERS="${HOME}/.mailfilters" logfile "$FILTERS/log" gdbmopen("$FILTERS/lists.db") foreach /^(To|Cc): .*/ { foreach (getaddr($MATCH)) =~ /.+/ { destbox = gdbmfetch($MATCH) log $MATCH log $destbox to $DEFAULT/$destbox } } gdbmclose

"$FILTERS/lists.db" is a GDBM file, whose source is similar to the following:

cour@lists.sourceforge.net .Lists.Courier-maildrop

The above snippet doesn't deliver a message with a header that looks like:

To: ji@mcconnell.net, cour@lists.sourceforge.net

to the Maildir .Lists.Courier-maildrop, as I'm only matching on $MATCH, not $MATCH2. Since I don't really want to jump through hoops to figure out which $MATCHX variable I ought to be using, and since I'm subscribed to a great number of lists which makes a ton of "if" statements unwieldy, I'd really like to use some sort of keyed file.

So, I'm looking for suggestions. Right now my inbox is piling up with messages that don't belong there, so if you've managed to overcome this, please let me know the details...

Thanks!

-Jim