8 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] RHEL3, maildrop 2.0.2...
FromSent OnAttachments
Timothy HaApr 12, 2006 6:53 am 
Timothy HaApr 12, 2006 7:21 am 
Devin RubiaApr 12, 2006 7:23 am 
Timothy HaApr 12, 2006 7:26 am 
Jeronimo ZuccoApr 12, 2006 7:27 am 
Jeronimo ZuccoApr 12, 2006 9:43 am 
Timothy HaApr 12, 2006 9:52 am 
moussApr 12, 2006 3:12 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:Re: [maildropl] RHEL3, maildrop 2.0.2 doesn't make use of /etc/maildroprcActions...
From:mouss (mou@netoyen.net)
Date:Apr 12, 2006 3:12:42 pm
List:net.sourceforge.lists.courier-maildrop

Timothy Ha wrote:

Sorry my stupid question today. I have used maildrop in command line with some email, and found that my domains, being routed through a Mysql table, used virtual: as their method, not maildrop:

Now after I changed a test domain to maildrop:, maildrop started working. But I need some help with maildroprc scripting.

Postfix master.cf contains maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop /etc/maildroprc -d ${recipient}

So when email arrives at /etc/maildroprc, RECIPIENT is set to us@domain.com

How can I split it to make Maildir become /home/vmail/domain.com/u/user (this is how my vmail system is doing), or at least /home/vmail/domain.com/user ?

if (${RECIPIENT} =~ /(\S+)@(\S+)/) { user=${MATCH1} domain=${MATCH2} } else { user="$RECIPIENT" domain=" }

be careful if you allow spaces or "weired" characters in email addresses. because I see you running an mkdir or maildirmake using these variables, but you don't want to do 'mkdir /home/vmail/foo; rm -rf /home/vmail'.

better put the mailbox location in mysql instead.

I am a newbie in bash scripting...

bash? this is maildrop, not bash.

Thanks.

This is the piece that I need to change:

------------------------------------------------- VHOME="/home/vmail"

RECIPIENT=tolower("$1") USER=tolower("$2") HOST=tolower("$3") SENDER=tolower("$4") HOME=tolower("$5")

you are not using any $* in your master.cf (except /etc/maildroprc which should be removed).