5 messages in net.sourceforge.lists.courier-maildrop[maildropl] problem with the bcc head...
FromSent OnAttachments
Thierry BJun 27, 2006 9:18 am 
Sam VarshavchikJun 27, 2006 3:33 pm 
Thierry BJun 27, 2006 4:10 pm 
Thierry BJun 27, 2006 11:51 pm 
moussFeb 4, 2007 12:46 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] problem with the bcc header of a mail not treated by maildropActions...
From:Thierry B (mail@thierry.eu.org)
Date:Jun 27, 2006 9:18:07 am
List:net.sourceforge.lists.courier-maildrop

Hello,

I try this test with maildrop with an eml file that I've created:

debian:/home/thierry# cat message4.eml From: xx@free.fr To: xx@wanadoo.fr Bcc: xx@yyy.eu.org Subject:zzzz

butthe mail that is in bcc header is not treated.

I've put that in my maildroprc:

---------------------------------------------------------------------------------------------------------------------------------------------- SENDMAIL="/usr/sbin/sendmail -oi -f $FROM" #logfile "/var/log/maildrop.log" #VERBOSE = "5" #log "========"

/To:.*/:h TO="$MATCH"

/Bcc:.*/:h BCC="$MATCH"

/From:.*/:h FR="$MATCH"

/Subject:.*/:h SUB="$MATCH"

if ( $SIZE < 26144 ) { exception { xfilter "/usr/bin/spamassassin" } }

if (/^X-Spam-Flag: *YES/) { exception { `logger -t maildrop -pmail.info "$FR $TO $SUB File:$DEFAULT/.Spam"` to "$HOME/$DEFAULT/.Spam/" } }

ADDRLIST=""

foreach /^(To|Cc|Bcc): .*/ { foreach (getaddr($MATCH)) =~ /.*/ { ADDRLIST="$ADDRLIST $MATCH"

if ((tolower($MATCH)) eq xx@wanadoo.fr) { exception { `logger -t maildrop -pmail.info "$FR $TO $ADDRLIST $SUB Match:$MATCH File:$DEFAULT/.Wanadoo"` to "$HOME/$DEFAULT/.Wanadoo/" } }

if ((tolower($MATCH)) eq xx@yyy.eu.org) { exception { `logger -t maildrop -pmail.info "$FR $TO $ADDRLIST $SUB Match:$MATCH File:$DEFAULT/.yyy"` to "$HOME/$DEFAULT/.yyy/" } } else { exception { `logger -t maildrop -pmail.info "$FR $TO $SUB Match:$MATCH File:$DEFAULT"` to "$HOME/$DEFAULT" } } } }

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

And this is the content of maildrop.log

Jun 27 18:01:35 debian maildrop: From: xx@free.fr To: xx@wanadoo.fr xx@wanadoo.fr Subject: zzz Match:xx@wanadoo.fr File:xxx.eu.org/thierry/Maildir//.Wanadoo

So the rule for bcc is not treated by maildrop because as you see, the value of ADDRLIST is just xx@wanadoo.fr but I can print the value of BCC if I want, and it's the good value, the problem is maybe in "foreach /^(To|Cc|Bcc): .*/" ?

I don't understand why?

Thanks :-)

Bye.