Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Intermitant spamassassin using spamd/spamc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lonegd
Apprentice
Apprentice


Joined: 07 Dec 2003
Posts: 185
Location: UK

PostPosted: Wed Feb 11, 2004 3:48 pm    Post subject: Intermitant spamassassin using spamd/spamc Reply with quote

I've just installed Mail-SpamAssassin-2.60-rc1 and set it up using spamd/spamc:-

Code:

mcooper@newdire mcooper $ cat .procmailrc
LOGFILE=$HOME/.procmail.log
VERBOSE=no

:0fw
| spamc -s 1024000

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped.  This will re-add it.
:0
* ^^rom[ ]
{
        LOG="*** Dropped F off From_ header! Fixing up. "

        :0 fhw
        | sed -e '1s/^/F/'
}
mcooper@newdire mcooper $ cat /etc/mail/spamassassin/local.cf
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
#
# rewrite_subject 0
rewrite_subject 1
# report_safe 1
report_safe 0
# trusted_networks 212.17.35.
add_header all Status _YESNO_, hits=_HITS_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_


Unfortunately, 9 times out of ten, the mails are *NOT* being tagged by SpamAssassin. There are NO X-Spam-* headers attached to the message although I can see syslog messages saying the mail was passed to spamd ( although it doesn't say its clean or spam ):-

Code:

Feb 11 15:21:09 newdire spamd[22357]: connection from localhost [127.0.0.1] at port 3286
Feb 11 15:21:09 newdire spamd[2212]: info: setuid to mcooper succeeded
Feb 11 15:21:09 newdire spamd[2212]: processing message <001c01c3f0b0$bd068fa0$0100a8c0@tinia> for mcooper:1000.


Here's what happens when I run a test message through:-

Code:

mcooper@newdire mcooper $ cat mtest | spamc -R
0/0
mcooper@newdire mcooper $ spamassassin < mtest
Return-Path: <myname@myhost>
Received: from pop.ntlworld.com [62.253.162.50]
        by localhost with POP3 (fetchmail-6.2.3)
        for myname@localhost (single-drop); Fri, 06 Feb 2004 15:49:06 +0000 (GMT)
Received: from myhost ([myip])
          by mta07-svc.ntlworld.com
          (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP
          id <20040206154709.DYBK26543.mta07-svc.ntlworld.com@myhost>
          for <myname@myisp>; Fri, 6 Feb 2004 15:47:09 +0000
Received: from myname by myhost with local (Exim 4.14)
        id 1Ap8C8-0000VA-Dw
        for myname@myisp; Fri, 06 Feb 2004 15:47:04 +0000
To: myname@myisp
Subject: test 9
Message-Id: <E1Ap8C8-0000VA-Dw@myhost>
From: myname@myhost
Date: Fri, 06 Feb 2004 15:47:04 +0000
X-Spam-Checker-Version: SpamAssassin 2.60-rc1 (1.197-2003-08-21-exp) on
        myhost
X-Spam-Level: *
X-Spam-Status: No, hits=1.5 required=8.0 tests=NO_DNS_FOR_FROM,NO_REAL_NAME,
        RCVD_IN_SORBS autolearn=no version=2.60-rc1

test 9

mcooper@myhost mcooper $ cat mtest | spamc -R
1.5/8.0
Spam detection software, running on the system "myhost", has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email.  If you have any questions, see
root@localhost for details.

Content preview:  test 9 [...]

Content analysis details:   (1.5 points, 8.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 0.3 NO_REAL_NAME           From: does not include a real name
 1.1 NO_DNS_FOR_FROM        Domain in From header has no MX or A DNS records
 0.1 RCVD_IN_SORBS          RBL: SORBS: sender is listed in SORBS
                            [80.6.201.3 listed in dnsbl.sorbs.net]



Whats going on??
_________________
Mark Cooper
http://pvrhw.goldfish.org/ - Open Source PVR Hardware Database
Back to top
View user's profile Send private message
lonegd
Apprentice
Apprentice


Joined: 07 Dec 2003
Posts: 185
Location: UK

PostPosted: Fri Feb 13, 2004 2:09 pm    Post subject: Re: Intermitant spamassassin using spamd/spamc Reply with quote

Looks like this was due to my FQDN not being resolvable! I installed a DNS cache ( maraDNS ) making the negative lookups much quicker and its all started to work. :P

This explains why it was intermittant - being based on how quickly I was getting a negative lookup from my ISP's DNS servers

Not that impressed that a DNS timeout would make SpamAssassin fail :(
_________________
Mark Cooper
http://pvrhw.goldfish.org/ - Open Source PVR Hardware Database
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum