Thanks,
Changing VPOPCMD to
VPOPCMD="/home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]"
and using xfilter solved the case. Also, found some great examples at
"http://mymail.alien77.com/maildropMEGAEXAMPLE".
Cheers,
-Morten
Andreas Wiesmann wrote:
Now, if mail is sent to an account using the exact account name, mail
is delivered as it should be. However, If I send mail to an account
using an alias (via fastforward), mail doesn't get delivered. Why?
I'm using
VPOP="| /home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]"
which is the same as in the (old) .qmail-default file. The
mail-filter is chown'ed vpopmail:vchkpw and the log file says local
delivery is delivering "...to local
<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]".
But nothing ever arrives.
its probably the same thing we noticed for forwards set through
qmailadmin by users (.qmail in user dir). you can probably go around
this using (credits go to lola)
xfilter "$VPOPCMD"
exit
instead of to "$VPOP". I dont know the real reason but it looks if
maildrop terminates before the mail is successfully forwarded?
I add the maildrop script I use now below just for people with similar
problems searching the archives
cheers
andrej
# mailfilter written by andrej [EMAIL PROTECTED] to
# 1. check if .Spam maildir and deliver if its spam
# 2. check if .qmail in virtual home and proceed with this
# 3. check if mailfilters from sqwebmail in virtual home and filter
# 4. standard mail delivery
# PREREQUISITS
# file in ./Maildir or /usr/local/share/sqwebmail called
maildirfilterconfig
# with
# MAILDIRFILTER=../.mailfilter
# MAILDIR=$VHOME/Maildir
# this filter is calle by .qmail-default
# | maildrop mailfilter
#logfile $VHOME/log
logfile "/var/log/maildrop"
import SENDER
import FROM
import EXT
import HOST
import RPLINE
import DTLINE
#log "Sender: $SENDER From: $FROM ext: $EXT host: $HOST rpline:
$RPLINE dtline: $DTLINE"
SENDMAIL="/var/qmail/bin/sendmail"
VPOP="| /mailboxen/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VPOPCMD="/mailboxen/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
# virtual user home
VHOME=`/mailboxen/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
HOME=$VHOME
#log "VPOP: $VPOP"
#log "VHOME: $VHOME"
#log "SENDMAIL: $SENDMAIL"
`/usr/bin/test -d $VHOME`
if( $RETURNCODE != 0 )
{
echo 'Sorry, no mailbox here by that name. vpopmail (#5.1.1)'
EXITCODE=100
# log "bouncing"
exit
}
#log $SENDMAIL
# spam directory for automatic spam filtering
SPAMDIR="$VHOME/Maildir/.Spam"
`/usr/bin/test -d $SPAMDIR`
SPAMDIRF="$RETURNCODE"
#log "SPAMDIR: $SPAMDIR SPAMDIRF: $SPAMDIRF"
# dotqmail
DOTQMAIL="$VHOME/.qmail"
`/usr/bin/test -f $DOTQMAIL`
DOTQMAILF="$RETURNCODE"
#log "DOTQMAIL: $DOTQMAIL DOTQMAILF: $DOTQMAILF"
# further maildrop filters (configured via sqwebmail)
SQMAILF="$VHOME/.mailfilter"
`/usr/bin/test -f $SQMAILF`
SQMAILFF="$RETURNCODE"
#log "SQMAILF: $SQMAILF SQMAILFF: $SQMAILFF"
if ($SPAMDIRF == 0)
{
if (/^X-Spam-Flag: *YES/)
{
log "xspam yes and spamdir exists"
exception {
# to Spamfolder
to "$SPAMDIR"
}
}
}
if ($DOTQMAILF == 0)
{
exception {
# proceed with .qmail
#log ".qmail exists"
# to "$VPOP"
# now replaced with xfilter due to lost forwardmail
xfilter "$VPOPCMD"
exit
}
}
if ($SQMAILFF == 0)
{
exception {
# proceed with maildrop filters
#log "include filters"
include $VHOME/.mailfilter
}
exception {
# proceed
#log "standard delivery after filter inclusion"
to "$VPOP"
}
}
else
{
exception {
# proceed
#log "standard delivery"
to "$VPOP"
}
}
#log "end"