6 messages in net.sourceforge.lists.courier-usersRe: [courier-users] auto-maildir gene...
FromSent OnAttachments
Bryan IrvineSep 20, 2005 10:53 am 
Bowie BaileySep 20, 2005 11:10 am 
Jay LeeSep 20, 2005 11:10 am 
Gordon MessmerSep 20, 2005 11:19 am 
Bryan IrvineSep 20, 2005 12:17 pm 
Bryan IrvineSep 20, 2005 12:19 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: [courier-users] auto-maildir generationActions...
From:Jay Lee (jl@pbu.edu)
Date:Sep 20, 2005 11:10:57 am
List:net.sourceforge.lists.courier-users

Bryan Irvine wrote:

I'm trying to have the maildirs automatically generated when an email comes in for a user stored in ldap, if the directory doesn't already exist.

I've tried various forms of /etc/maildroprc.

The current non-functioning-but-looks-right-to-me version looks like so.

`/usr/bin/test -d $HOME` if( $RETURNCODE != 0) { `mkdir -p $DIR` `maildirmake $HOME` `chown virtual.virtual -R $DIR` } logfile "$HOME/maildrop.log"

What am I missing here?

The fact that maildrop attempts a cwd to $HOME before executing the maildroprc or .mailfilter scripts. If $HOME doesn't exist, maildrop will error out before even looking at your script. Sam is opposed to adding auto maildir/home creation to maildrop, arguing that doing so is the responsibility of the admin at account creation time, not the delivery agent and also that things would get ugly real fast should the maildirs be on a remote filesystem that is unmounted... There are a few patches floating around though that add this funcitonality, search the list archives...

Jay