Can't get spam checking working?

Michael H. Warfield mhw at wittsend.com
Sun Jan 6 17:37:40 GMT 2002


On Sun, Jan 06, 2002 at 04:20:31PM +0000, Julian Field wrote:
> At 15:53 06/01/2002, you wrote:
> >> At this point is the mailscanner process still running? What's the last
> >few
> >> mailscanner lines in your maillog when this happens?
> >
> >        For me at least, the MailScanner process is gone.
> >
> >        Last MailScanner messages I see in maillog is "Scanning x messages,
> >xxx bytes".  I restart the MailScanner by hand and get the same message
> >(generally same x messages and xxx bytes) and if often continues.  Last
> >night, I had to restart it 6 times in the same spot (i.e. I looked after
> >starting it and it was gone again) but then it worked and was running
> >this morning when I got up.  So it seems to be "non-deterministic" in
> >some way.  Sendmail processes continue to run even after the mailscanner
> >process dumps.

> This has got to be bugs in Perl as it is non-deterministic. What error do
> you get when it dies? Just a "Segmentation fault" or something more useful?

        None of the above.  No "Segmentation fault" and no messages to
standard out or standard error.  The only message I see is "Starting
virus scanner..." and the process later exits.  Now, one thing I haven't
done (but will the next time it does this) is to run it in debugging mode
and keep it in the forground.

> Unfortunately, quite a lot happens after that maillog entry before anything
> more happens that will log to maillog, so it's not a very good indicator of
> where in MailScanner it died. I'll look at reimplementing some of the
> timeout code, as that's the only code I have ever written that has
> repeatedly caused Perl to segmentation fault.

> Does it still segmentation fault with all the spam checking switched off?
> That would help narrow it down a bit.

        Right now, the only spam checking it's running is one of the RBLs.
SpamAssassin is disabled.

> Can you also try starting it in debug mode and see if it still dies at the
> same place. And does it log anything more before it dies? The best way of
> starting it is with the check_mailscanner script. (Don't touch the sendmail
> processes while doing this, they will happily carry on working)

        I'll try that.

> >> You may well need to upgrade your version of Perl, a few people are
> >seeing
> >> Perl core-dump due to internal bugs in Perl itself.
> >
> >        Because I installed SpamAssassin and used CPAN, I ended up with
> >Perl upgraded to 5.6.1 anyways.  I've currently got SpamAssassin disabled
> >in the MailScanner script because of the errors (tagging all messages)
> >being reported and discussed in the other thread on this list.

> Are you sure that you are using the upgraded Perl 5.6.1? You might have
> ended up with 2 copies of Perl installed on your system. Do a
> "/usr/bin/perl -v" just to check...

        Very sure.  I remarked to some friends to watch out if they were
running CPAN on a RedHat system and it tried to upgrade perl because the
default would go into /usr/local/bin.  I had caught that when I saw it
and directed the perl build to use /usr for the prefix, but here is the
double check, anyways...

[mhw at alcove mhw]$ /usr/bin/perl -v

This is perl, v5.6.1 built for i586-linux

> I've seen SpamAssassin tag *a few* messages that it shouldn't have, but the
> SA is_spam() routine definitely always says they are spam, so my code is
> only doing exactly what SpamAssassin says it should be.

        Yeah, I've got SpamAssasin disabled in the MailScanner config
right now and am only using it from procmail.  There are definitely some
problems there, expecially vis-a-vis exit codes.  The code itself claims
there is a -e switch to enable a non-zero exit code on spam, but the
-e switch isn't even recognized.  I haven't even looked into the API
calls yet or followed up over on the SpamAssassin side of the house.
The plain text reporting is working incredibly well, though, and I
like Vipul's Razor.  Getting it to play nicey nicey with MailScanner
would be a nice benefit...

        Oh...  BTW...  In one of your earlier messages I noticed a remark
that you had seen times when SpamAssassin didn't exit.  I've noticed that
there are times when it takes a LONG time to exit.  Seems to center
around the RBL checks and seems to correspond to sluggishness in the
DNS (which would make some sense).  I have yet to see the spamassassin
command not eventually exit.  I did have problems with MailScanner
initially, which I tracked down to the default of including the JANET
UK RBL which seems to cause the MailScanner to hang on my system.
Don't know if that is still the default in the lastest bundles, but
it caused me some serious headaches till I realized what was misconfigured.

> --
> Julian Field                Teaching Systems Manager
> jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
> Tel. 023 8059 2817          University of Southampton
>                             Southampton SO17 1BJ

        Mike
--
 Michael H. Warfield    |  (770) 985-6132   |  mhw at WittsEnd.com
  /\/\|=mhw=|\/\/       |  (678) 463-0932   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!



More information about the MailScanner mailing list