hhab da irgendwie ein Problem mit dem Autoresponder in Maildrop. Wollte das einbauen und es klappt soweit auch alles. Nur eben kommt keine Mail zurück und in der maildrop.log taucht ein Fehler auf.
Code: Select all
File: | mailbot -t /var/kunden/mail/test/vacation.txt -d autoresponsedb (767)
Code: Select all
DEFAULT=`echo " select maildir from mail_users where username = '$LOGNAME';" | mysql -u syscp -psyscp syscp -h 127.0.0.1 | grep @`
# set this to 1 if you want to log the usersettings vor vscan, etc.
LOGUSERSETTINGS=1
# Full path to the maildrop log of each user
LOGFILEPATH=$HOME$DEFAULT/maildrop.log
# Setting for SysCP maildrop module
USESYSCPSETTINGS=0
# Basedir of your syscp installation
SYSCPBASEDIR="/var/www/syscp"
# Default setting for the spamfilter
SPAMFILTER=1
# use spamc instead of the direct call to spamassassin
USESPAMC=0
# Default setting for the virusscan
VSCAN=0
# include userdefined filters into maildrop
USERFILTER=0
# basedir of your userdefined filterfiles
MAILFILTERDIR="/var/kunden/mailfilter"
# Only scan mails smaller than SCANSPAMSIZE for spam
SCANSPAMSIZE="2000000"
# Only scan mails smaller than VSCANSIZE for a virus
VSCANSIZE="2000000"
#logfile "/var/log/maildroprc.log"
#########################################################
# Do NOT change anything below this line unless you know
# what you're doing!
#########################################################
#
# First check if the maildir exists and create it, if
# it doesn't exist
#
#########################################################
MAILDIR=$HOME$DEFAULT
#MAILDIR=$HOME$LOGNAME
`test -d "$MAILDIR"` # check if dir exist
if ($RETURNCODE != 0)
{
`mkdir -p $MAILDIR` # create dirs with parents
`rmdir $MAILDIR` # remove dir for init
`/usr/bin/maildirmake $MAILDIR` # create maildir
}
#########################################################
#
# init logfile for this user
#
#########################################################
logfile "$LOGFILEPATH"
log "========================================================================="
if ( $LOGUSERSETTINGS )
{
log "Maildir: $MAILDIR"
log "Logname: $LOGNAME"
}
#########################################################
#
# run spamfilter
#
#########################################################
if ( $SPAMFILTER )
{
if( $SIZE < $SCANSPAMSIZE )
{
exception {
if ( $USESPAMC )
{
xfilter "/usr/bin/spamc -f -x -u $LOGNAME"
}
else
{
xfilter "/usr/bin/spamassassin -x"
}
}
}
# check if mail is marked as spam
if(/^X-Spam-Flag: *YES/)
{
exception {
log "identifyed as spam! -> $MAILDIR/.Spam"
MAILDIR = $MAILDIR.Spam/
VSCAN=0
USERFILTER=0
}
}
}
#########################################################
#
# Hier gehts zur Vacation, falls abwesend -> Nachricht zurück
#
#########################################################
log "----------------------------------------"
log "Test der Abwesenheit auf: $MAILDIR/vacation.txt"
`test -f $MAILDIR/vacation.txt`
if ($RETURNCODE==0)
{
log "Empfänger abwesend! Leite Nachrichtenversand an Absender ein."
`test -f $MAILDIR/vacation_subject.txt`
if ($RETURNCODE==0)
{
SUBJECT=`cat $MAILDIR/vacation_subject.txt`
RESPOND="$MAILDIR/vacation.txt"
RESPONDDB="$MAILDIR/respond.db"
cc "| mailbot -t /var/kunden/mail/test/vacation.txt -d autoresponsedb -A 'From: test@domain.lan' /usr/sbin/sendmail -t ' '"
}
else
{
cc "| mailbot -t /var/kunden/mail/test/vacation.txt -A 'From: test@domain.lan'' /usr/sbin/sendmail -t ' '"
}
}
else
{
log "Empfänger Anwesend."
}
log "Vacation Filter beendet"
log "----------------------------------------"
#########################################################
#
# create needed sub-directory, if it doesn't exist
#
#########################################################
`test -d "$MAILDIR"`
if( $RETURNCODE == 1 )
{
`mkdir -p $MAILDIR`
`rmdir $MAILDIR`
`/usr/bin/maildirmake "$MAILDIR"`
}
#########################################################
#
# deliver mail to maildir
#
#########################################################
exception {
log "Filtern erledigt. Stelle Mail zu."
to "$MAILDIR"
}