3 messages in net.sourceforge.lists.courier-maildrop[maildropl] deliver a message to mult...
FromSent OnAttachments
MikeDec 22, 2006 4:47 pm 
Sam VarshavchikDec 22, 2006 6:50 pm 
MikeDec 22, 2006 6:55 pm 
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] deliver a message to multiple folders?Actions...
From:Mike (mik@mikee.ath.cx)
Date:Dec 22, 2006 4:47:35 pm
List:net.sourceforge.lists.courier-maildrop

I think the 'to' command is final (yes?) for delivering messages. Is there another way to deliver the same message to multiple folders? I'm trying to test a configuration change before I modify any of my users. My ~/.mailfilter so far looks like:

-------------------------------------------------------- SUBJECT=`$FORMAIL -x Subject:` SPAMVERSION=`$FORMAIL -x X-Spam-Checker-Version:` SPAMSTATUS=`$FORMAIL -x X-Spam-Status:` log "(==) $TIME SUBJECT='$SUBJECT' using mikee's rules"

if ( $FROM =~ /^[a-z]+@$DOMAIN.com/ ) { log "(==) $TIME '$SUBJECT' from $DOMAIN user '$FROM': delivering" to "$HOME/Maildir/" } if ( $SUBJECT =~ /NOTICE: mail delivery status/ ) { log "(==) $TIME '$SUBJECT' from $DOMAIN user '$FROM': delivering" to "$HOME/Maildir/" } # the copfilter added on $HOST, the ipcop box that has copfilter installed if ( /^X-Copfilter/ ) { log "(==) $TIME delivering scanned '$SUBJECT' to mikee@$DOMAIN.com from
'$FROM'" log "(==) SPAM-VERSION='$SPAMVERSION'" log "(==) SPAM-STATUS='$SPAMSTATUS'" to "$HOME/Maildir/" } else { log "(==) $TIME forwarding '$SUBJECT' for mikee@$DOMAIN.com from '$FROM' to
$HOST for scanning" to "|/tmp/smtp.pl '$FROM' mikee@$DOMAIN.com" }

--------------------------------------------------------

The delivery stanza (the third 'if' from the top) I want to keep doing what it does, delivering the message to $HOME/Maildir. I want to continue delivering 'to "$HOME/Maildir/"' and also to another directory for testing this new project. Can I put two 'to's in the if clause so it looks like:

if ( /^X-Copfilter/ ) { log "(==) $TIME delivering scanned '$SUBJECT' to mikee@$DOMAIN.com from
'$FROM'" log "(==) SPAM-VERSION='$SPAMVERSION'" log "(==) SPAM-STATUS='$SPAMSTATUS'" to "$HOME/Maildir/" to "$HOME/project/" <=== added this line } else { log "(==) $TIME forwarding '$SUBJECT' for mikee@$DOMAIN.com from '$FROM' to
$HOST for scanning" to "|/tmp/smtp.pl '$FROM' mikee@$DOMAIN.com" }