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.

SpamAssassin (w/ MailScanner) not working?

Discussion in 'E-mail Discussions' started by puzz1ed1, Oct 11, 2004.

  1. puzz1ed1

    puzz1ed1 Active Member

    Joined:
    Jan 31, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Thurrock, UK
    noticed that SpamAssassin keeps stopping, with the following in /var/log/maillog:

    spamc[25548]: connect(AF_INET) to spamd at 127.0.0.1 failed, retrying (#3 of 3): Connection refused


    Anyone else come across this?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    SpamAssassin should not be running if you're using it through MailScanner (i.e. you should stop it in WHM). If you've just upgraded, you have to do the following to get it running again:

    /scripts/mailscannerupdate
    /scripts/restartsrv_exim
     
  3. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Jonathan, do you mean we need to run that script if we update SA to 3.0 from 2.64 and are running it from Mailscanner?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No. Running those two commands is currently required if cPanel Pro updates. This is because cPanel hasn't put the link to the MailScanner script into the cPanel Pro install scripts for some reason:
    http://bugzilla.cpanel.net/show_bug.cgi?id=1336

    If you find that MailScanner is not scanning emails, run those two commands and you should be back in action. You can run those two at any time as what it does is to take the current exim.conf, copy it to exim_outgoing.conf and make the MailScanner changes to it.

    Personally, I'm adding those commands to my /scripts/postupcp script so that they're initiated after each upcp run, just incase:

    /scripts/postupcp:
    Code:
    #!/bin/sh
    /scripts/mailscannerupdate
    /scripts/restartsrv_exim
     
  5. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    I can confirm this happening on servers where SpamAssassin is not enabled serverwide (that is, it is disabled in MailScanner, but enabled for users in their control panels). Thus far, I have confirmed this on two RHEL boxes running the latest Release plus all updated packages.
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you are having spamassassin problems, the first thing you should do is run:

    spamassassin --lint

    If you get errors, you can get more verbose information with:

    spamassassin --lint -D

    If you paste the results of either/both here I'd be happy to offer my opinion ;)
     
  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
    As an addendum to my /scripts/postupcp script changes:

    1. You should chmod 700 /scripts/postupcp otherwise it won't run ;)

    2. The reason for having to do this is that the cPanel Pro installer breaks it because it (the cPanel Pro installer) modifies exim.conf for the boxtrapper stuff. For some reason they decided not to integrate the mailscanner script which they have nicely done with other exim update scripts :rolleyes:
     
  8. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for that. I thought Cpanel Pro only updates itself if that option is selected under WHM -> Addon Modules -> Cpanel Pro. Or does it update automatically regardless of that setting?
     
  9. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Dunno - I have it ticked :p
     
  10. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    These boxes are not Pro-enabled, by the way. I've been looking at this for two days, and no errors are present (or have been, since I ran this right off when the problems started) when looking at lint. But here's a fresh output. Maybe you can see something I'm missing here.

    debug: SpamAssassin version 3.0.0
    debug: Score set 0 chosen.
    debug: running in taint mode? yes
    debug: Running in taint mode, removing unsafe env vars, and resetting PATH
    debug: PATH included '/usr/local/jdk/bin', which doesn't exist, dropping.
    debug: PATH included '/usr/kerberos/sbin', keeping.
    debug: PATH included '/usr/kerberos/bin', keeping.
    debug: PATH included '/usr/local/sbin', keeping.
    debug: PATH included '/usr/local/bin', keeping.
    debug: PATH included '/sbin', keeping.
    debug: PATH included '/bin', keeping.
    debug: PATH included '/usr/sbin', keeping.
    debug: PATH included '/usr/bin', keeping.
    debug: PATH included '/usr/X11R6/bin', keeping.
    debug: PATH included '/usr/local/bin', keeping.
    debug: PATH included '/usr/X11R6/bin', keeping.
    debug: PATH included '/root/bin', which doesn't exist, dropping.
    debug: Final PATH set to: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin
    debug: diag: module installed: DBI, version 1.45
    debug: diag: module installed: DB_File, version 1.808
    debug: diag: module installed: Digest::SHA1, version 2.10
    debug: diag: module installed: IO::Socket::UNIX, version 1.21
    debug: diag: module installed: MIME::Base64, version 3.05
    debug: diag: module installed: Net::DNS, version 0.48
    debug: diag: module not installed: Net::LDAP ('require' failed)
    debug: diag: module not installed: Razor2::Client::Agent ('require' failed)
    debug: diag: module installed: Storable, version 2.13
    debug: diag: module installed: URI, version 1.34
    debug: ignore: using a test message to lint rules
    debug: using "/etc/mail/spamassassin/init.pre" for site rules init.pre
    debug: config: read file /etc/mail/spamassassin/init.pre
    debug: using "/usr/share/spamassassin" for default rules dir
    debug: config: read file /usr/share/spamassassin/10_misc.cf
    debug: config: read file /usr/share/spamassassin/20_anti_ratware.cf
    debug: config: read file /usr/share/spamassassin/20_body_tests.cf
    debug: config: read file /usr/share/spamassassin/20_compensate.cf
    debug: config: read file /usr/share/spamassassin/20_dnsbl_tests.cf
    debug: config: read file /usr/share/spamassassin/20_drugs.cf
    debug: config: read file /usr/share/spamassassin/20_fake_helo_tests.cf
    debug: config: read file /usr/share/spamassassin/20_head_tests.cf
    debug: config: read file /usr/share/spamassassin/20_html_tests.cf
    debug: config: read file /usr/share/spamassassin/20_meta_tests.cf
    debug: config: read file /usr/share/spamassassin/20_phrases.cf
    debug: config: read file /usr/share/spamassassin/20_porn.cf
    debug: config: read file /usr/share/spamassassin/20_ratware.cf
    debug: config: read file /usr/share/spamassassin/20_uri_tests.cf
    debug: config: read file /usr/share/spamassassin/23_bayes.cf
    debug: config: read file /usr/share/spamassassin/25_body_tests_es.cf
    debug: config: read file /usr/share/spamassassin/25_hashcash.cf
    debug: config: read file /usr/share/spamassassin/25_spf.cf
    debug: config: read file /usr/share/spamassassin/25_uribl.cf
    debug: config: read file /usr/share/spamassassin/30_text_de.cf
    debug: config: read file /usr/share/spamassassin/30_text_fr.cf
    debug: config: read file /usr/share/spamassassin/30_text_nl.cf
    debug: config: read file /usr/share/spamassassin/30_text_pl.cf
    debug: config: read file /usr/share/spamassassin/50_scores.cf
    debug: config: read file /usr/share/spamassassin/60_whitelist.cf
    debug: using "/etc/mail/spamassassin" for site rules dir
    debug: config: read file /etc/mail/spamassassin/local.cf
    debug: using "/root/.spamassassin" for user state dir
    debug: using "/root/.spamassassin/user_prefs" for user prefs file
    debug: config: read file /root/.spamassassin/user_prefs
    debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC
    debug: plugin: registered Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760)
    debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC
    debug: plugin: registered Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8b29500)
    debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC
    debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH(0x8b065e4)
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) implements 'parse_config'
    debug: plugin: Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8b29500) implements 'parse_config'
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) inhibited further callbacks
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) inhibited further callbacks
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) inhibited further callbacks
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) inhibited further callbacks
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) inhibited further callbacks
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) inhibited further callbacks
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) inhibited further callbacks
     
  11. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Part 2 of output


    debug: using "/root/.spamassassin" for user state dir
    debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
    debug: Score set 1 chosen.
    debug: ---- MIME PARSER START ----
    debug: main message type: text/plain
    debug: parsing normal part
    debug: added part, type: text/plain
    debug: ---- MIME PARSER END ----
    debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
    debug: metadata: X-Spam-Relays-Trusted:
    debug: metadata: X-Spam-Relays-Untrusted:
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) implements 'parsed_metadata'
    debug: is Net::DNS::Resolver available? yes
    debug: Net::DNS version: 0.48
    debug: trying (3) intel.com...
    debug: looking up NS for 'intel.com'
    debug: NS lookup of intel.com succeeded => Dns available (set dns_available to hardcode)
    debug: is DNS available? 1
    debug: decoding: no encoding detected
    debug: URIDNSBL: domains to query:
    debug: all '*From' addrs: ignore@compiling.spamassassin.taint.org
    debug: Running tests for priority: 0
    debug: running header regexp tests; score so far=0
    debug: registering glue method for check_uridnsbl (Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760))
    debug: registering glue method for check_hashcash_double_spend (Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8b29500))
    debug: registering glue method for check_for_spf_helo_pass (Mail::SpamAssassin::Plugin::SPF=HASH(0x8b065e4))
    debug: SPF: message was delivered entirely via trusted relays, not required
    debug: registering glue method for check_hashcash_value (Mail::SpamAssassin::Plugin::Hashcash=HASH(0x8b29500))
    debug: all '*To' addrs:
    debug: registering glue method for check_for_spf_softfail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8b065e4))
    debug: SPF: message was delivered entirely via trusted relays, not required
    debug: registering glue method for check_for_spf_pass (Mail::SpamAssassin::Plugin::SPF=HASH(0x8b065e4))
    debug: registering glue method for check_for_spf_helo_softfail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8b065e4))
    debug: registering glue method for check_for_spf_helo_fail (Mail::SpamAssassin::Plugin::SPF=HASH(0x8b065e4))
    debug: running body-text per-line regexp tests; score so far=-2.623
    debug: running uri tests; score so far=-2.623
    debug: Razor2 is not available
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) implements 'check_tick'
    debug: running raw-body-text per-line regexp tests; score so far=-2.623
    debug: running full-text regexp tests; score so far=-2.623
    debug: Razor2 is not available
    debug: Current PATH is: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin
    debug: Pyzor is not available: pyzor not found
    debug: DCCifd is not available: no r/w dccifd socket found.
    debug: DCC is not available: no executable dccproc found.
    debug: Running tests for priority: 500
    debug: RBL: success for 1 of 1 queries
    debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x84d0760) implements 'check_post_dnsbl'
    debug: running meta tests; score so far=-2.623
    debug: running header regexp tests; score so far=-1.053
    debug: running body-text per-line regexp tests; score so far=-1.053
    debug: running uri tests; score so far=-1.053
    debug: running raw-body-text per-line regexp tests; score so far=-1.053
    debug: running full-text regexp tests; score so far=-1.053
    debug: Running tests for priority: 1000
    debug: running meta tests; score so far=-1.053
    debug: running header regexp tests; score so far=-1.053
    debug: using "/root/.spamassassin" for user state dir
    debug: lock: 20818 created /root/.spamassassin/auto-whitelist.lock.server.domain.com.20818
    debug: lock: 20818 trying to get lock on /root/.spamassassin/auto-whitelist with 0 retries
    debug: lock: 20818 link to /root/.spamassassin/auto-whitelist.lock: link ok
    debug: Tie-ing to DB file R/W in /root/.spamassassin/auto-whitelist
    debug: auto-whitelist (db-based): ignore@compiling.spamassassin.taint.org|ip=none scores 0/0
    debug: AWL active, pre-score: -1.053, autolearn score: -1.053, mean: undef, IP: undef
    debug: DB addr list: untie-ing and unlocking.
    debug: DB addr list: file locked, breaking lock.
    debug: unlock: 20818 unlink /root/.spamassassin/auto-whitelist.lock
    debug: Post AWL score: -1.053
    debug: running body-text per-line regexp tests; score so far=-1.053
    debug: running uri tests; score so far=-1.053
    debug: running raw-body-text per-line regexp tests; score so far=-1.053
    debug: running full-text regexp tests; score so far=-1.053
    debug: is spam? score=-1.053 required=5
    debug: tests=ALL_TRUSTED,MISSING_DATE,MISSING_SUBJECT,NO_REAL_NAME
    debug: subtests=__HAS_MSGID,__MSGID_OK_DIGITS,__MSGID_OK_HOST,__SANE_MSGID,__UNUSABLE_MSGID


    Another strange thing I've found is that the exim advanced config option will not load, nor will the mail queue load without a complete restart of both exim (after killing off spamd) and mailscanner. This also occurs on the two servers noted as well as another, all of which run RHEL. Other servers running RHEL have no issues, and other versions of RH show no issues. In all cases, the failure of SA is quite random, does not affect everyone on the server, and even for those it does affect, only intermittently fails for them. It's very puzzling.
     
Loading...

Share This Page