On Tue, 6 Feb 2018, fe...@kngnt.org wrote:
Hi everybody,
I have a postfix + amavis + dovecot setup, with spamassassin running both as amavis
plugin and dovecot "before" stage sieve filter. The reason for this setup is
that I want to reject mail that is obviously spam as soon as possible (done in amavis)
but, as users are also able to mark mail as spam, I want the second stage (running as
dovecot sieve script) to mark mail as spam or ham based on user preferences. I am running
into few issues with this setup... maybe somebody can provide some help or some direction
to point to? In any case, thank you for your time!
So far, a specific mail gets out of amavis with the following headers:
X-Spam-Flag: NO
X-Spam-Score: -1.098
X-Spam-Level:
X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5
tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
When that mail comes out of the second stage, these are its headers (the
previous headers are dropped):
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on kngnt.org
X-Spam-Level:
X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,
SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.1
Do you guys know if there is any way to ask spamc (that is run in the
second stage) to run only the tests related to user-provided training,
so that no tests are run twice? Also, do you know if there is any way to
prevent the dropping of the previous run headers, so that the scoring of
the current test can be summed to that of the previous?
Thank you very much!
Felix
This would be *very* custom. I don't believe there's any way to do
something like this with any existing glue tools.
At present the closest you could get to that is to run two different SA
installs having different rulesets (before and after), but there's no
supported way to have the second pass include the first pass's score.
Summarizing the scores would be something glue-level; it would have to
rename the results header from the first pass so that the second pass
doesn't remove it, and then have a custom postprocessing step that would
summarize the two result headers to a final result.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhar...@impsec.org FALaholic #11174 pgpk -a jhar...@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
If guards and searches and metal detectors can't keep a gun out of
a maximum-security solitary confinement prisoner's cell, how will
a disciplinary policy and some signs keep guns out of a university?
-----------------------------------------------------------------------
Today: the first Falcon Heavy test launch