4 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] maildrop/postfix argv's
FromSent OnAttachments
mess-mateJan 7, 2007 11:29 am 
Thorsten HaudeJan 7, 2007 11:58 am 
mess-mateJan 8, 2007 6:11 am 
mess-mateJan 8, 2007 10:56 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] maildrop/postfix argv'sActions...
From:mess-mate (mess@wanadoo.fr)
Date:Jan 8, 2007 6:11:04 am
List:net.sourceforge.lists.courier-maildrop

Thorsten Haude <list+mail@thorstenhau.de> wrote: | Moin, | | * mess-mate wrote (2007-01-07 20:30): | >Maybe i looked not far enaough, but can't find any (with examples) | >tuto about the maildrop delivering configs. | | man maildropex

Ok, didn't know

| | | >So how can i configure maildrop like my procmail: | | In my experience, very easy. It took me only a couple of minutes to | translate my Procmail rules. I never looked back. | | | >:0 | >#*^TO_d@lists.debian.org | >*^(From|Cc|To).*@lists.debian.org | >${MAILDIR}.Debian/ | | Generally: | if (/(From|Cc|To).*@lists.debian.org/) | { | to ${MAILDIR}.Debian/ | } | Sorry, do not work for me.

..snip.. | | For mailing list, I use a database: | gdbmopen("/home/yooden/.mutt/lists.db") | | foreach /^(To|Cc): .*/ | { | foreach (getaddr($MATCH)) =~ /.+/ | { | listbox = gdbmfetch(tolower($MATCH)) | if ($listbox ne "") | { | to $MAILDIR/ML/$listbox | } | } | } | | gdbmclose | Have no experience with gdbm :(

Her is my maildroprc ( without any user/mailfilter): # maildroprc file

LOGNAME=tolower("$LOGNAME") # complete login name RECIPIENT=$LOGNAME SENDER1:$5 DOMAIN=$4 USER=$3 #RECIPIENT=tolower("$1") #DEFAULT="/home/vmail/$RECIPIENT/." RACINEMAIL="/home/vmail/$DOMAIN/$USER/" DEFAULT="/home/vmail/$DOMAIN/$USER/.A-Inbox"

## come from /etc/postfix/master.cf: #flags=Ru user=vmail argv=/usr/bin/maildrop -w 90 -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop} ${sender} # # -w 90 is telling maildrop to send a quota warning to users with 90% of quota used up # -d is telling maildrop to run as user as specified by user=x:x # ${user} is comprised of everything before the @ symbol in the recipient's email address. # ${nexthop} is the domain; everything after the @ symbol in the recipient's email address. # ${recipient} is nothing more than ${user}@${nexthop} # ${sender} is complete email address of the sender

#logfile "/home/vmail/.mailfilters/maildroprc-log.txt" logfile "/var/log/maildrop.log"

log "------------------------------------------------------------- Linux-bugtraq " log "LOGNAME:$LOGNAME RECIPIENT:$RECIPIENT" log "N1:$1 N2:$2 N3:$3 N4:$4 SENDER1:$SENDER1 N6:$6 N7:$7" SENDER:$SENDER log "RACINE:$RACINEMAIL" log "DEFAULT=$DEFAULT"

#if ( "$EXTENSION" ne "" ) #{ # DELIMITER="+" #}

#if (!$SENDER) #{ # SENDER = "<>" #}

# # Autocreate maildir, if not existant # test -e /home/vmail/$DOMAIN if ( $RETURNCODE != 0 ) { maildirmake /home/vmail/$DOMAIN chmod -R 0700 /home/vmail/$DOMAIN} test -e /home/vmail/$DOMAIN/$USER if ( $RETURNCODE != 0 ) { maildirmake /home/vmail/$DOMAIN/$USER chmod -R 0700 /home/vmail/$DOMAIN/$USER}

# Check that user has his own maildrop include, # if not available, check if $DEFAULT is set # (newer maildrop get's that from the DB and updates # it) and deliver or fail temporarily if not available # test -f /home/vmail/.mailfilters/$LOGNAME if ( $RETURNCODE == 0 ) { include "/home/vmail/.mailfilters/$LOGNAME" } else { if ( "$DEFAULT" ne "" ) { #if ( /^Subject: SPAM/) #if ( /^X-Spam-Level: *-----.*$/ ) if ( /^X-Spam-Level: \*\*\*\*/ ) { test -e $RACINEMAIL.spam if ($RETURNCODE != 0 ) { maildirmake $RACINEMAIL.spam chmod -R 0700 $RACINEMAIL.spam } log"--------------------- Spam general. " to "$RACINEMAIL.spam" # Make this "cc" for copy or "to" to notsend it to Inbox. } else { log "-------- (.spam) is vailable. " to "$RACINEMAIL.spam" # was "$DEFAULT" } } else # { # EXITCODE=75 # exit # } #} =============== this part would not work ========== {# folders in mailbox if (/(From|Cc|To|Sender).*@lists.debian.org/) { to ${RACINEMAIL}.Debian/ log "put in $RACINEMAIL.Debian/" } else { to ${RACINEMAIL}.A-Inbox/ log "else put in $RACINEMAIL.A-Inbox/" } ========== end this part do not work =========== } }

You will be attacked by a beast who has the body of a wolf, the tail of a lion, and the face of Donald Duck.