Hello!
Sorry , here is my full .mailfilter file : copy/paste user error
#
# Import variables
#
logfile "/temp/maildrop3.log"
LOGNAME=tolower("$LOGNAME")
EXTENSION="$1"
RECIPIENT=tolower("$2")
USER=tolower("$3")
HOST=tolower("$4")
SENDER="$5"
DEFAULT="/var/vmail/$HOST/$USER/."
#logfile "/var/mail/$HOST/$USER/mailfilter.log"
# Workaround for broken tolower function in some current fedora releases
if(!$USER)
{
USER=$3
}
if(!$HOST)
{
HOST=$4
}
if ( "$EXTENSION" ne "" )
{
DELIMITER="+"
}
if (!$SENDER)
{
SENDER = "<>"
}
#
# Autocreate maildir, if not existant
#
`test -e /var/vmail/$HOST`
if ( $RETURNCODE != 0 )
{
`mkdir /var/vmail/$HOST`
}
`test -e /var/vmail/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
# `maildirmake /var/vmail/$HOST/$USER`
# `chmod -R 0700 /var/vmail/$HOST`
}
`test -e /var/vmail/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
# available exitcodes: EX_NOUSER=67, EX_TEMPFAIL=75
EXITCODE = 67
exit
}
# Check if the user has a autoresponder enabled
`test -f /var/vmail/mailfilters/$HOST/$USER/.autoresponder`
if ( $RETURNCODE == 0 )
{
include "/var/vmail/mailfilters/$HOST/$USER/.autoresponder"
}
# Create a mailsize file
`echo $SIZE >> /var/vmail/$HOST/$USER/ispconfig_mailsize`
#
# Test if the 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 /var/vmail/mailfilters/$HOST/$USER/.mailfilter`
if ( $RETURNCODE == 0 )
{
include "/var/vmail/mailfilters/$HOST/$USER/.mailfilter"
}
else
{
if ( "$DEFAULT" ne "" )
{
to "$DEFAULT"
}
else
{
EXITCODE=75
exit
}
}
Recent comments
22 hours 45 min ago
22 hours 50 min ago
1 day 3 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 16 hours ago
1 day 23 hours ago
2 days 3 hours ago
2 days 5 hours ago