/etc/maildroprc :
Code:
# Global maildrop filter file
# Uncomment this line to make maildrop default to ~/Maildir for
# delivery- this is where courier-imap (amongst others) will look.
#DEFAULT="$HOME/Maildir"
LOGNAME=tolower("$LOGNAME")
EXTENSION="$1"
RECIPIENT=tolower("$2")
USER="$3"
HOST="$4"
SENDER="$5"
DEFAULT="/home/vmail/$HOST/$USER/."
if ( "$EXTENSION" ne "" )
{
DELIMITER="+"
}
if (!$SENDER)
{
SENDER = "<>"
}
#
# Autocreate maildir, if not existant
#
`test -e /home/vmail/$HOST`
if ( $RETURNCODE != 0 )
{
`mkdir /home/vmail/$HOST`
}
`test -e /home/vmail/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
`/usr/local/maildrop/bin/maildirmake /home/vmail/$HOST/$USER`
`chmod -R 0700 /home/vmail/$HOST`
}
#
# 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 "" )
{
to "$DEFAULT"
}
else
{
EXITCODE=75
exit
}
}
In fact my reel question must be:
Can user connect to her mailbox before i create his maildir (manualy or automatically when user received first mail) ?