[Mimedefang] delete spam based on score

Cormack, Ken kcormack at acs.roadway.com
Fri Nov 21 16:13:05 EST 2003


-----Original Message-----
From: Chambers, Dean [mailto:deanc at ci.breckenridge.co.us]
Sent: Friday, November 21, 2003 1:09 PM
To: mimedefang at lists.roaringpenguin.com
Subject: RE: [Mimedefang] delete spam based on score

::snip::

> I added the following line to sbu fliter_end:

> ####################
> # Added this to discard any message with SA score of 10 or more
> ####################
> if ($hits >= 10) {
>     md_graphdefang_log('sa_discard_score');
> return action_discard();
> }

> My maillog is spitting out this error:
> Nov 21 09:48:25 revere mimedefang-multiplexor: Slave 0 stderr: Use of
uninitiali
> zed value in numeric ge (>=) at /etc/mail/mimedefang-filter line 408.

> Any ideas?


Dean,

Based on the error, I would guess you placed the new lines BEFORE the lines
that call SpamAssassin (and therefore, BEFORE the variable "$hits" gets
defined.  (Your error said that one side of the ">=" comparison was not
initialized.)

Make sure the added lines appear AFTER the call to SpamAssassin, so that
SpamAssassin can get a chance to set the value of $hits.

Look for this series of lines in mimedefang-filter...

            # Only scan messages smaller than 100kB.  Larger messages
            # are extremely unlikely to be spam, and SpamAssassin is
            # dreadfully slow on very large messages.
            my($hits, $req, $names, $report) = spam_assassin_check();
            if ($hits >= $req) {
                md_graphdefang_log('spam', $hits, $RelayAddr);
                my($score);
                if ($hits < 40) {
                    $score = "*" x int($hits);
                } else {
                    $score = "*" x 40;
                }

Then add your lines immediately after that.

KEN CORMACK, RHCE
Sr. UNIX Systems Analyst,
    Open Systems Group
Sr. Software Analyst,
    TSG Midrange Systems Group
AFFILIATED COMPUTER SERVICES, INC.
    557 E. Tallmadge Ave., Akron, OH  44310
    mailto:kcormack at acs.roadway.com
    mailto:ken.cormack at acs-inc.com
    Phone: (330) 643-6372
    Fax: (330) 643-6367
    Pager: (800) 946-4646 Pin 1412819

"If that that is 'is' is that that is not 'not is', is that that is 'not is'
that that is not 'is'?  It is!" - Ken Cormack

"Sendmail administration is not black magic.  There are legitimate technical
reasons why it requires the sacrificing of a live chicken." - Unknown



More information about the MIMEDefang mailing list