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