hi
(I posted this already in the sqwebmail list but nobody was able to help, so maybe there is somebody here...)
I tried to run vpopmail, qmailadmin, sqwebmail, maildrop using the .qmail in the user home created by qmailadmin with the maildrop filter below (maildrop launched from .qmail-default). What it does is:
# 1. check if .Spam maildir exists and deliver if its spam
# 2. check if .qmail in virtual home and proceed with vdelivermail
# 3. check if mailfilters from sqwebmail in virtual home and include them
# 4. standard mail delivery with vdelivermail


The message gets lost if there is a forward address entry in the qmailadmin generated .qmail file (&[EMAIL PROTECTED]).

Everything works fine if I dont have &[EMAIL PROTECTED] in the .qmail file, files are delivered, vacancy message works etc. if I have a forward address set in .qmail the e-mail is not forwarded. There is no error visible in the logs, the e-mail simply disappears (see logs below). If I select the forward and local store in qmailadmin, the e-mail is stored locally but not forwarded. If I have no .qmail file everything works fine. Is that a known problem or did I do something really stupid?

thanks
andrej


# mailfilter written by [EMAIL PROTECTED] to # work with qmail, vpopmail, sqwebmail, qmailadmin # 1. check if .Spam maildir exists and deliver if its spam # 2. check if .qmail in virtual home and proceed with vdelivermail # 3. check if mailfilters from sqwebmail in virtual home and include them # 4. standard mail delivery with vdelivermail

# PREREQUISITS
# needs program to check if file exists /usr/bin/test
# file in ./Maildir or /usr/local/share/sqwebmail called maildirfilterconfig
# with
# MAILDIRFILTER=../.mailfilter
# MAILDIR=$VHOME/Maildir

# this filter is called by .qmail-default
# | maildrop mailfilter

SENDMAIL="/var/qmail/bin/sendmail"
VPOP="| /mailboxen/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
#VPOP="| /mailboxen/vpopmail/bin/vdelivermail '' /var/qmail/popboxes/vpopmail/domains/sfgb-b.ch/0/d.stettler


# virtual user home
VHOME=`/mailboxen/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
HOME=$VHOME

#logfile $VHOME/log
logfile "/var/log/maildrop"

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"
  }
}

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"



qmail log:
2004-03-06 12:28:33.470223500 info msg 3287085: bytes 788 from <[EMAIL PROTECTED]> qp 9789 uid 506
2004-03-06 12:28:33.472087500 starting delivery 31703: msg 3287085 to local [EMAIL PROTECTED]
2004-03-06 12:28:33.472096500 status: local 1/10 remote 0/20
2004-03-06 12:28:33.541194500 delivery 31703: success: did_0+0+1/
2004-03-06 12:28:33.541201500 status: local 0/10 remote 0/20
2004-03-06 12:28:33.541203500 end msg 3287085


maildrop log (using the script in my previous posting)
SENDMAIL: /var/qmail/bin/sendmail
SPAMDIR: /mailboxen/vpopmail/domains/q.com/0/test/Maildir/.Spam SPAMDIRF: 0
DOTQMAIL: /mailboxen/vpopmail/domains/q.com/0/test/.qmail DOTQMAILF: 0
SQMAILF: /mailboxen/vpopmail/domains/q.com/0/test/.mailfilter SQMAILFF: 0
.qmail exists
Date: Sat Mar  6 12:28:33 2004
From: [EMAIL PROTECTED]
Subj: test 2
File: | /mailboxen/vpopmail/bin/vdelivermail '' bounce-no-mailbox        (788)

Reply via email to