[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vchkpw
Subject:    [vchkpw] qmail+qmail-scanner+vpopmail+maildrop
From:       "Rafi Khardalian" <rafi () fourty ! net>
Date:       2003-08-29 12:12:51
[Download RAW message or body]


Hi all,

So I've managed to get the combination of software packages listed above,
with one glitch. The most confusing part of all of this was getting maildrop
to play nice with vpopmail. Fortunately, I happened to stumble on a script
by Howard Jones
(http://wotsit.thingy.com/haj/mailfilter-spamassassin-vpopmail.shtml) which
was pretty close to what I was trying to accomplish.

Rather than calling spamassassin via maildrop, as done in Howard's script,
qmail-scanner provides that function for me -- being called via QMAILQUEUE.
So I've modified his script to accommodate for the change, as provided
below.  All of this works as you'd expect, unless email is marked as spam
for a non-existent mailbox/user.

SPAM flagged to invaliduser@domain.com (deferral):
deferral:
Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/maildrop:_error_writing_to_mai
lbox./maildrop:_Unable_to_deliver_to_mailbox./

Clean to invaliduser@domain.com (failure):
delivery 3269: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/

Why am I getting a deferral when the message is marked as SPAM, instead of
the correct response of a failure? The obvious annoyance here is that the
deferral ends up sitting in the queue for 'queuelifetime', repeatedly
failing to deliver before sending the bounce. At this point my mind is blank
and was hoping I could find some direction or opinions on how to get to the
bottom of this.

I hope I've made some sense -- been a long day.

Regards,

Rafi

---

VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST`
BOUNCE="|/usr/bin/bouncesaying 'Sorry, no mailbox here by that name.
(#5.1.1)'"

# Absense of this check resulted in deferred status in cases
# where spamassassin flagged email positive.

if ($RETURNCODE > 0)
{
        to "$BOUNCE"
        exit
}

if (/^X-Spam-Status: *Yes/)
{
        # try filtering it using user-defined rules
        exception {
                include $VHOME/Maildir/.mailfilter
        }
        # then try delivering it to a Spam folder
        exception {
                # to "$VPOP"
                to "$VHOME/Maildir/.Spam/"
        }
        # ah well, I guess they'll just have to live with disappointment
        exception {
                to "$VPOP"
        }
}
else
{
        exception {
                include $VHOME/Maildir/.mailfilter
        }
        exception {
                to "$VPOP"
                exit
        }
}

exit




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic