View Single Post
  #9  
Old 27th July 2011, 12:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,478
Thanks: 813
Thanked 5,255 Times in 4,121 Posts
Default

The mailfilter file is incomplete or you did not post the whole file. The complete mailfilter file should look like this:

Code:
#
# Import variables
#

LOGNAME=tolower("$LOGNAME")
EXTENSION="$1"
RECIPIENT=tolower("$2")
USER=tolower("$3")
HOST=tolower("$4")
SENDER="$5"
DEFAULT="/var/vmail/$HOST/$USER/."

# 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`
}

# 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
  }
}
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote