jessicahabbit
(usa Outra)
Enviado em 28/04/2013 - 00:52h
Ola, segue o meu maildroprc.
Caso possa ajudar eu agradeceria bastante.
SHELL="/bin/sh"
VHOME="/data/postfix/"
# get username part of mail address
ACCOUNT=`echo $LOGNAME | cut -d@ -f1`
# Get users domains from mail address
USERDOMAIN=`echo $LOGNAME | cut -d@ -f2`
#log "HOME: $HOME"
# Check if Maildir does not exist.
`test -d $VHOME/$USERDOMAIN/$ACCOUNT/Maildir`
if ( $RETURNCODE == 1 )
{
# log "Creating dir $VHOME/$USERDOMAIN/$ACCOUNT/Maildir"
# Create path to domain if not exists.
`/bin/mkdir -p $VHOME/$USERDOMAIN/$ACCOUNT/`
# Create maildir
`/usr/local/bin/maildirmake $VHOME/$USERDOMAIN/$ACCOUNT/Maildir`
}
# IF SPAM
if (/^X-DSPAM-Result: Spam$/)
{
# If .Spam does not exist, create.
`test -d $VHOME/$USERDOMAIN/$ACCOUNT/Maildir/.Spam`
if ( $RETURNCODE == 1 )
{
# Create .Spam maildir under user
`/usr/local/bin/maildirmake -f Spam $VHOME/$USERDOMAIN/$ACCOUNT/Maildir/`
}
# Deliver mail tagged as spam to the .Spam/ maildir.
exception {
to "$VHOME/$USERDOMAIN/$ACCOUNT/Maildir/.Spam"
}
}