I have a problem with amavis calling spamassassin: Every message
regardless of content gets scanned as

  spam-tag, <sender> -> <recipient>, No, score=0 [..] tests=[none] [..]

regardless of content (tested with real ham, real spam and GTUBE). The
connection to SA itself is working, it is (according to the logs)
properly initialised and parameters get correctly looked up and pplied
from SA's local.cf and associated userpref SQL database.
Bayes learning is also working (with Bayes autolearn activated), the
Bayes database is getting filled (with nonsense, because everything is
learned as ham).

SA on its own is working correctly: If I send the mail through SA
manually before it is processed by amavis, it inserts the proper headers
(which are also picked up by amavis and trigger quarantine, etc., but it
still overwrites them with the score=0-stuff its own call to SA yields.

Relevant log portions (with loglevel 5):
Normal setup:
  amavis[11186]: initializing Mail::SpamAssassin (0)
  amavis[11186]: SpamAssassin debug facilities: info
  amavis[11186]: SpamAssassin loaded plugins: AskDNS,
    AutoLearnThreshold, Bayes, BodyEval, Check, DKIM, DNSEval, FreeMail,
    HTMLEval, HTTPSMismatch, Hashcash, HeaderEval, ImageInfo, MIMEEval,
    MIMEHeader, Pyzor, Razor2, RelayEval, ReplaceTags, SPF, SpamCop,
  amavis[11186]: SpamControl: init_pre_fork on SpamAssassin done
  amavis[11196]: (11196-01) lookup [sa_userconf] => true, "<recipient>"
    matches, result="sql:", matching_key="."
  amavis[11196]: (11196-01) lookup [sa_username] => true, "<recipien>"
    matches, result="ad...@katmail.de", matching_key="(?^i:^([^@]+@.*))"
  amavis[11196]: (11196-01) calling SA parse (0), SA vers 3.4.1,
    3.004001,data as STRING_REF, recips_ind [0], conf:
    "sql:<recipient>", user:"<recipient"
  amavis[11196]: (11196-01) CALLING SA check (0)
  amavis[11196]: (11196-01) DONE SA check (0)
  amavis[11196]: (11196-01) spam_scan: score=0 autolearn=ham
    autolearn_force=no tests=[none] recips=0
  amavis[11196]: (11196-01) spam-tag, <ad...@katmail.de> ->
    <ad...@katmail.de>, No, score=0 tagged_above=-999 required=6 tests=
    [none] autolearn=ham autolearn_force=no

With spamd as content-filter before amavis (postfix -> spamd ->
postfix-pickup -> amavis -> postfix), spamd does its work, amavis logs
look pretty much the same except for:
  amavis[11772]: (11772-02) deleted: X-Spam-Checker-Version:
    SpamAssassin 3.4.1 (2015-04-28) on coyote.katmail.de
  amavis[11772]: (11772-02) deleted: X-Spam-Flag: YES
  amavis[11772]: (11772-02) deleted: X-Spam-Level:
  amavis[11772]: (11772-02) deleted: X-Spam-Status: Yes, score=998.9
    required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED,\n
    \tDKIM_VALID,DKIM_VALID_AU,GTUBE autolearn=no autolearn_force=no
when resubmitting to postfix.

Result: Mail is quarantined because of the SA headers originally added
by spamd, but the headers themselves are still score=0 etc, with
autoleearn=true the message is learned as ham.

Versions: amavisd-new  2.11.0
          spamassassin 3.4.1

Both are running with SQL storage for userprefs etc.. Apart from this
error, amavis appears to be running without issues.

Any ideas?


Reply via email to