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:Bowie Bailey (Bowi@BUC.com)
Date:Sep 20, 2005 11:10:06 am
List:net.sourceforge.lists.courier-users

From: Bryan Irvine [mailto:spar@gmail.com]

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?

First off, what does it do? Does it create anything, or does it skip the directory creation block? Add some echo statements so you can log what is going on.

Unless your system is different than mine...shouldn't the "chown" command have colons between user and group?

`chown virtual:virtual -R $DIR`

Also, why don't you simply write it like this and avoid the extra $RETURNCODE variable?

if (`/usr/bin/test -d $HOME`) { # make directories }

Untested, but I think it should work this way.

Bowie