The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Spamassasin 3.0 not playing nice with SPAMD

Discussion in 'General Discussion' started by mr.wonderful, Sep 24, 2004.

  1. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0
    There are issues with SA3.0 and Spamd integrated via Cpanel.

    Here is the error we are seeing on every server.

    Sep 24 21:34:11 srv07 spamd[25850]: info: setuid to zambizzi succeeded
    Sep 24 21:34:11 srv07 spamd[25850]: bayes: bayes db version 2 is not able to be used, aborting! at /usr/lib/perl5/site_perl/5.8.1/Mail/SpamAssassin/BayesStore/DBM.pm line 160.
    Sep 24 21:34:11 srv07 spamd[25850]: processing message <20040925013400.OPFX10179.viefep11-int.chello.at@viefep11-int> for zambizzi:32042.
    Sep 24 21:34:11 srv07 spamd[25850]: bayes: bayes db version 2 is not able to be used, aborting! at /usr/lib/perl5/site_perl/5.8.1/Mail/SpamAssassin/BayesStore/DBM.pm line 160, <GEN3> line 145.

    It says bayes db v2 is not able to be used yet our version of bayes has already been upgraded to 3.0 format. Every time there is a setuid issued the bayes db v2 error appears. The database is not v2 otherwise we would be seeing this problem evertime normal messages are queried against the db and we are NOT seeing errors any other time other than setuid. The error also referrs to DBM.PM which is already installed on the server.

    /usr/lib/perl5/site_perl/5.8.1/Mail/SpamAssassin/BayesStore/DBM.pm
     
  2. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Did u upgrade the bayes db to current version?
    If not try this:

    Stop spamd ... oir exim for that matter
    run sa-learn --sync

    Start Exim if it throws no error.

    Anup
     
  3. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    According to the SpamAssassin documentation, the DB upgrade is supposed to occur automatically the first time the DB is accessed. I've seen a few instances where this process fails and the DB must be deleted manually. Spamd sends it's log messages to syslog's mail log, generally /var/log/maillog. You can find any errors reported there.
     
  4. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0
    Gawd, this i know. Im saying when setuid is issue the lookup to bayes fails. Every other time is works. We should not have to delete our bayes db. Mine is already in 3.0 format. There is work to be done for those using spamassassin via the control panel.
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I've never seen that work and had to delete the existing DB. The fix Anup posted hasn't worked for me either. Considering the effectiveness of Bayesian filtering, it soon populates effectively, though, so it's not that much of a hit. Considering SA3 is quite different with the rules it carries, etc, it wouldn't necessarily be a bad thing to start with a new DB anyway, from a Bayesian standpoint.
     
  6. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    sa-learn --sync does correct the same and gets things to work.
    running the above from root, gets the system wide thingy to db3.0
    now the problem is wrt user.

    Repeate the same for every user. ... ie login as that user from shell and run the command.
    Yes the docs say that it shoiuld upgrade automatically, but it does not happen so ... i found that wrt all users who had SA configured on their account.

    Painful process but it works.

    sa-learn --sync from each users shell...
    Deleting should be the last resort as if you already have a learnt database, why not be able to use it...

    After having run the above command from user's shell run the following to see that error gone and if you had not deleted the db, then perhaps all the db stats:

    spamassassin --lint -D

    Running the above command before sa-learn --sync would reveal the same error as what you see in case of setuid....

    Best Luck
    Anup
     
    #6 anup123, Oct 5, 2004
    Last edited: Oct 5, 2004
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I do know it should correct it ;) I'm just saying that on all the servers that I tried it on, it did not work.
     
  8. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0
    Nope, im still getting this from spamd.

    mAssassin/Conf/Parser.pm line 715.
    Oct 5 13:04:01 srv08 last message repeated 4 times
    Oct 5 13:04:01 srv08 spamd[21617]: Use of uninitialized value in bitwise and (&) at /usr/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin/Conf/Parser.pm line 625.
    Oct 5 13:04:01 srv08 spamd[21617]: Use of uninitialized value in numeric eq (==) at /usr/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin/Conf/Parser.pm line 663.
    Oct 5 13:04:01 srv08 last message repeated 5 times
    Oct 5 13:04:01 srv08 spamd[21617]: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin/Conf/Parser.pm line 692.
    Oct 5 13:04:01 srv08 spamd[21617]: unknown type for __REPORT_DSN: 18 at /usr/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin.pm line 1671.

    Spamd is obviously not working properly, whether you turn bayes on or off it fails. These messages clearly indicated a spamd issue as of the latest Cpanel update.

    And without MailScanner running SPAMD chokes;

    Oct 5 13:36:15 srv08 spamc[25498]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#1 of 3): Connection refused
    Oct 5 13:36:16 srv08 spamc[25498]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#2 of 3): Connection refused
    Oct 5 13:36:17 srv08 spamc[25498]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#3 of 3): Connection refused
    Oct 5 13:36:18 srv08 spamc[25498]: connection attempt to spamd aborted after 3 retries

    I highly recommend that you are running any type of Edge release prior to E70 that you lay off upgrading at this time.
     
    #8 mr.wonderful, Oct 5, 2004
    Last edited: Oct 5, 2004
  9. cPanelBilly

    cPanelBilly Guest

    We are in the last stages of writing a patch to do this for everyone, should be out a little later today
     
  10. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0
    The new upgrade thats supposed to fix the spamd issue did not fix spamd. Its out there to upgrade to but it does not fix the issue at all.

    mAssassin/Conf/Parser.pm line 715.
    Oct 5 13:04:01 srv08 last message repeated 4 times
    Oct 5 13:04:01 srv08 spamd[21617]: Use of uninitialized value in bitwise and (&) at /usr/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin/Conf/Parser.pm line 625.
    Oct 5 13:04:01 srv08 spamd[21617]: Use of uninitialized value in numeric eq (==) at /usr/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin/Conf/Parser.pm line 663.
    Oct 5 13:04:01 srv08 last message repeated 5 times
    Oct 5 13:04:01 srv08 spamd[21617]: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin/Conf/Parser.pm line 692.
    Oct 5 13:04:01 srv08 spamd[21617]: unknown type for __REPORT_DSN: 18 at /usr/lib/perl5/site_perl/5.8.4/Mail/SpamAssassin.pm line 1671.
     
  11. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Could u see if the error displayed by running the following give any clue:

    spamassassin --lint -D

    Are you using any rules from http://rulesemporium.com ?

    I am *not running Mailscanner* but with exiscan :)
    Anup
     
    #11 anup123, Oct 5, 2004
    Last edited: Oct 5, 2004
  12. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0
    Its not the rules. Im running the identical rules and setup on all my servers with the exception of 1 server which i upgraded yesterday then the spamd issues started.
     
  13. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    I just upgraded to 9.9.0-CURRENT_80 and find no abnormaility at all.
    All running fine.

    [EDIT]
    In fact it upgraded the bayesdb also for users who had not upgraded. I had missed on two...
    [/EDIT]

    Anup
     
    #13 anup123, Oct 5, 2004
    Last edited: Oct 6, 2004
  14. Aric1

    Aric1 Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    mr. wonderful's problem is related to his recent Perl upgrade and has nothing to do with SA.
     
  15. cPanelBilly

    cPanelBilly Guest

    yeo that was released last night. Also another way to update the bayes and config files is to run
    /usr/local/cpanel/bin/spamassassin3update
     
  16. mr.wonderful

    mr.wonderful BANNED

    Joined:
    Feb 1, 2004
    Messages:
    345
    Likes Received:
    0
    Trophy Points:
    0

    How do you know? Its ok, its sorted out now and it wasnt Perl!
     
  17. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    So, what was the problem and how was it fixed? It's only polite to post the resolution for others that find this thread.
     
  18. smachol

    smachol Well-Known Member

    Joined:
    Oct 19, 2001
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Would this problem explain why today all of the spam emails that used to be blocked are now getting through? If so, will running this fix this problem?

    /usr/local/cpanel/bin/spamassassin3update
     
    #18 smachol, Oct 7, 2004
    Last edited: Oct 7, 2004
  19. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    It's hard to say the running spamassassin3update will fix your issues. If you look at the script, then you'll see that it updates the user configuration files and runs and sa-learn --snyc for every user. If your problems are related to the configuration file or the Bayes DB then you may be in luck. There's really no need to run it manually though, it's called by upcp and set to only run once. If you need to run it again, then you'll have to delete the file /var/cpanel/version/SpamAssassin3.0.0.

    Most the problems that I'm seeing with SA are due to an incomplete upgrade. The best suggestion in to reinstall SA through CPAN manually. It only takes a few minutes, and it's a good place to start. If that doesn't resolve your issue, then submit a support ticket to your license provider.

    Just a note, there have been some complaints about the number of child processes that spamd pre-forks. Though most people are concerned that there are "5!!!" processes now in addition to the parent, the real problem is that 5 is too few processes for a very busy mail server. I made some changes to the exim init scripts and the restartsrv scripts that will give you some more control over how spamd is ran.

    I'll post the configuration file to this thread when I get a chance. If you're really anxious then you can just grok the getspamdopts function in /scripts/Restartsrv.pm.
     
  20. spiritguardian

    spiritguardian Active Member

    Joined:
    Apr 30, 2004
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I don't have a an update script it seems. Here's the error I'm getting currently.

    configuration file "/usr/share/spamassassin/20_body_tests.cf" requires version 2.55 of SpamAssassin, but this is code version 3.000000. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/lib/perl5/site_perl/5.8.1/Mail/SpamAssassin/Conf/Parser.pm line 329.
     
Loading...

Share This Page