11 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] use maildrop with syslog
FromSent OnAttachments
Thierry BFeb 3, 2006 3:54 am 
Sam VarshavchikFeb 3, 2006 2:44 pm 
Thierry BFeb 3, 2006 4:13 pm 
Sam VarshavchikFeb 3, 2006 6:24 pm 
Thierry BFeb 4, 2006 12:59 am 
moussFeb 4, 2006 1:36 pm 
Thierry BFeb 5, 2006 6:07 am 
moussFeb 5, 2006 9:56 am 
Thierry BFeb 6, 2006 4:42 am 
moussFeb 8, 2006 3:10 am 
Thierry BFeb 12, 2006 11:43 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] use maildrop with syslogActions...
From:Thierry B (mail@thierry.eu.org)
Date:Feb 12, 2006 11:43:38 am
List:net.sourceforge.lists.courier-maildrop

mouss a écrit :

Thierry B a écrit :

The problem is that if I send a mail and I put in the field To: te@linux.bouhnik.eu.org, thie@linux.bouhnik.eu.org, I receive 2 times the mail in the subfolder Teil, and I don't understand why, and how to correct that :-(.

you mean that in your MUA you send mail to both teil and thierry? If so, then your MUA will do 2 RCPT TO commands. you have two recipients, thus two message deliveries.

- you could use the duplicate removal recipe (see maildrop docs), but I'm not sure this is safe.** - See also http://www.postfix.org/postconf.5.html#enable_original_recipient

And if I send a mail for tbz@wanadoo.fr, it's sent also to thie@linux.bouhnik.eu.org with the option smtpname of fetchmail, but the mail goes also to the subdirectory Teil instead of Wanadoo.

probably because it matches the maildrop rule for "Teil", and this rule is checked before the one for "tbzone" in your configuration.

Hello,

I try to create a eample of mesage. I put that in message.eml:

--------------------------------------- From: bou@boubou.com To: tbz@wanadoo.fr Subject: coucou

Salut toi

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

after, I run manually maidrop like that: maildrop -V 4 -d thie@linux.bouhnik.eu.org < message.eml

tbz@wanadoo.fr is checked by fetchmail and sent to postfix after, so it's a good example.

And this is the results with an verbose log:

maildrop: authlib: groupid=1001 maildrop: authlib: userid=1001 maildrop: authlib: logname=thie@linux.bouhnik.eu.org, home=/home/vmail/, mail=linux.bouhnik.eu.org/thierry/Maildir/ maildrop: Changing to /home/vmail/ Message start at 0 bytes, envelope sender=thie@linux.bouhnik.eu.org /etc/maildroprc(2): SENDMAIL="/usr/sbin/sendmail -oi -f thie@linux.bouhnik.eu.org" Matching /To:.*/ against From: bou@boubou.com Not matched. Matching /To:.*/ against To: tbz@wanadoo.fr /etc/maildroprc(7): Search of To:.* = 1 /etc/maildroprc(8): TO="To: tbz@wanadoo.fr" Matching /From:.*/ against From: bou@boubou.com /etc/maildroprc(10): Search of From:.* = 1 /etc/maildroprc(11): FR="From: bou@boubou.com" Matching /Subject:.*/ against From: bou@boubou.com Not matched. Matching /Subject:.*/ against To: tbz@wanadoo.fr Not matched. Matching /Subject:.*/ against Subject: coucou /etc/maildroprc(13): Search of Subject:.* = 1 /etc/maildroprc(14): SUB="Subject: coucou" /etc/maildroprc(16): Evaluating IF condition. /etc/maildroprc(16): IF evaluated, result=1 /etc/maildroprc(18): Trapping exceptions. maildrop: Filtering through xfilter /usr/bin/spamassassin /etc/maildroprc(18): Exception trapping removed. /etc/maildroprc(23): Evaluating IF condition. Matching /^X-Spam-Flag: *YES/ against From: bou@boubou.com Not matched. Matching /^X-Spam-Flag: *YES/ against To: tbz@wanadoo.fr Not matched. Matching /^X-Spam-Flag: *YES/ against Subject: coucou Not matched. Matching /^X-Spam-Flag: *YES/ against X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on debian Not matched. Matching /^X-Spam-Flag: *YES/ against X-Spam-Level: Not matched. Matching /^X-Spam-Flag: *YES/ against X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,MISSING_DATE, NO_REAL_NAME autolearn=ham version=3.0.3 Not matched. /etc/maildroprc(23): Search of ^X-Spam-Flag: *YES = 0 /etc/maildroprc(23): IF evaluated, result=0 Matching /^(To|Cc): .*/ against From: bou@boubou.com Not matched. Matching /^(To|Cc): .*/ against To: tbz@wanadoo.fr Matching /^(To|Cc): .*/ against Subject: coucou Not matched. Matching /^(To|Cc): .*/ against X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on debian Not matched. Matching /^(To|Cc): .*/ against X-Spam-Level: Not matched. Matching /^(To|Cc): .*/ against X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,MISSING_DATE, NO_REAL_NAME autolearn=ham version=3.0.3 Not matched. /etc/maildroprc(31): Search of ^(To|Cc): .* = 1 Matching /.+/ against tbz@wanadoo.fr

/etc/maildroprc(33): Search of .+ = 1 /etc/maildroprc(35): Evaluating IF condition. /etc/maildroprc(35): IF evaluated, result=1 /etc/maildroprc(37): Trapping exceptions. maildrop: Filtering through `logger -t maildrop -pmail.info "$FR $TO $SUB Match:$MATCH File:$DEFAULT/.Teil"` WARN: quota string '0' not parseable

And whatever the email in the filed "to", the message goes to the subfolder Teil.

I join with the mail, my maildroprc, if it can help you.

Thanks :-).

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

/To:.*/:h TO="$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/" } }

foreach /^(To|Cc): .*/ { foreach (getaddr($MATCH)) =~ /.+/ { if ((tolower($MATCH)) == te@linux.bouhnik.eu.org) { exception { `logger -t maildrop -pmail.info "$FR $TO $SUB Match:$MATCH
File:$DEFAULT/.Teil"` to "$HOME/$DEFAULT/.Teil/" } } if ((tolower($MATCH)) == vir@linux.bouhnik.eu.org) { exception { `logger -t maildrop -pmail.info "$FR $TO $SUB Match:$MATCH
File:$DEFAULT/.Virus"` to "$HOME/$DEFAULT/.Virus/" } } if ((tolower($MATCH)) == tbz@wanadoo.fr) { exception { `logger -t maildrop -pmail.info "$FR $TO $SUB Match:$MATCH
File:$DEFAULT/.Virus"` to "$HOME/$DEFAULT/.Wanadoo/" } } else { exception { `logger -t maildrop -pmail.info "$FR $TO $SUB Match:$MATCH File:$DEFAULT"` to "$HOME/$DEFAULT" } } } }