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 6, 2006 4:42:37 am
List:net.sourceforge.lists.courier-maildrop

mouss a écrit :

Thierry B a écrit :

but i didn't mnage to use \n in the message of logger, to write something in th next line even with \\n.

Do you have an idea about how to do that?

You can't. syslog lines are lines! so '\n' is "reserved". If your issue is a line length limitation, then log multiple lines instead. you can then later parse the lines and "rebuild" a single one (or populate a db or whatever). just make sure there is some common info that eases this "rebuilding" task.

Hello,

I've another problems.

I have an account thie@linux.bouhnik.eu.org and some alias like te@linux.bouhnik.eu.org.

I've that in maincd of postfix:

# Alias de comptes ou forward virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf

mysql-virtual.cf:

user = vmail password = xxxxxxx dbname = mail table = postfix_virtual select_field = destination where_field = email hosts = 127.0.0.1

In mysql:

email destination te@linux.bouhnik.eu.org thie@linux.bouhnik.eu.org

just to explain you that mail for teil is given to thierry.

So after, Iv'e that in my /etc/maildroprc:

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 File:$DEFAULT/.Teil"` to "$HOME/$DEFAULT/.Teil/" } } if ((tolower($MATCH)) == vir@linux.bouhnik.eu.org) { exception { `logger -t maildrop -pmail.info "$FR $TO $SUB File:$DEFAULT/.Virus"` to "$HOME/$DEFAULT/.Virus/" } } if ((tolower($MATCH)) == tbz@wanadoo.fr) { exception { `logger -t maildrop -pmail.info "$FR $TO $SUB File:$DEFAULT/.Virus"` to "$HOME/$DEFAULT/.Wanadoo/" } } else { exception { to "$HOME/$DEFAULT" } } } }

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 :-(.

This is the maildrop's log:

Feb 6 13:08:11 debian maildrop: From: Thierry B <thbo@free.fr> To: te@linux.bouhnik.eu.org, thie@linux.bouhnik.eu.org Subject: Hello 15 File:linux.bouhnik.eu.org/thierry/Maildir//.Teil Feb 6 13:08:13 debian maildrop: From: Thierry B <thbo@free.fr> To: te@linux.bouhnik.eu.org, thie@linux.bouhnik.eu.org Subject: Hello 15 File:linux.bouhnik.eu.org/thierry/Maildir//.Teil

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.

Do you understand why?

Thanks :-)