On Sun, 29 Dec 2002, [EMAIL PROTECTED] wrote:
> 
> Actually, this *appeared* to work in testing, but once in production, it
> became pretty clear that the exitcode wasn't doing what I had
> thought/hoped; keeping bounce messages out of the queue.
> 
> The only other way I know of dealing with this at the MDA level is to
> route rejected email to /dev/null, which would mean that legit email
> caught by SA (there has been some) would be lost without any notification
> of the sender, which isn't acceptable.
> 
> I know of no way to use SA at the MTA level with qmail, and don't use
> Postfix. :-/

What I've done to use SA with qmail is to put in the .qmail file
something like:

    |/usr/local/bin/spamassassin.sh

Where spamassassin.sh is shell script which calls spamc and then checks to
see if the message was tagged as spam.  If so is calls something like
this to bounce the message:

  if [[ $message_score -ge $spam_limit ]]; then
    exec bouncesaying "Your Email was Rejected by out SPAM filters."
  fi

Otherwise it delivers the message using the "maildir" command and exits
with a return value of 0.  If you'd like I can post my script.  It also
does a bunch of other things like pull the spam_limit from a SQL database,
and also handle the forwarding of email to a remote address.
        -- Robert

-- 
  ------------------------------------------------------------------
    Robert James Kaes    ---  Flarenet Inc.  ---    (519) 426-3782
                       http://www.flarenet.com/
      * Putting the Service Back in Internet Service Provider *
  ------------------------------------------------------------------

Attachment: msg11518/pgp00000.pgp
Description: PGP signature

Reply via email to