On Sun, 13 Jan 2013, Axb wrote:
On 01/13/2013 05:15 PM, RW wrote:
On Sun, 13 Jan 2013 13:24:14 +0000
Jeremy Morton wrote:
> For example, if you want the grey area to be between 3.0 and 8.0,
> you'd set the normal SpamAssassin threshold to 3.0, then call spamc
> with the threshold override of 8.0. Scores under 3.0 would be OK;
> spamc returns 0 and the message is not rewritten. Scores between 3.0
> and 8.0 would be "grey area" - spamc still returns 0 (so a shell
> script will not discard it), but the message *is* rewritten.
I don't like it. If spamassassin is to have support for two-level
classification it should IMO be in the library and set through normal
configuration.
Normally this is achieved by the glue as with Amavis, MailScanner, using the
API or Fuglu using spamd results
IMO, spamc should remain simple and lightweight.
Agreed. Generally the caller looks for the "X-Spam-Status: Yes, score=16.6
..." header in the processed message to make the deliver/discard decision.
I think it's dangerously confusing to redefine "threshold" in this manner.
That said, however, controlling the return code of spamc would probably
simplify the caller's job in a lot of cases.
I think it would be better to avoid redefining the existing return code
semantics and instead define a new return code for "discard", which would
only be returned if a discard threshold was specified on the spamc command
line and the spam hit that threshold.
I think such a change in spamc would be minimal, something (conceptually)
along the lines of:
if (discard_thresh > spam_thresh && msg_score >= discard_thresh) {
return discard_result;
}
else if (msg_score >= spam_thresh) {
return spam_result;
} else {
return 0;
}
The first IF block would be the only new code apart from parsing the new
command line option, which is handled by a common library.
I haven't looked at how the various glues process the spamc output, if
they look for ==1 rather than >0 what I suggest might break lots of stuff.
Either way, as we're about to release a new version, *now* is the time to
make a major semantic change like this! Get it in bugzilla right away so
the devs can consider it.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
[email protected] FALaholic #11174 pgpk -a [email protected]
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Gun Control laws aren't enacted to control guns, they are enacted
to control people: catholics (1500s), japanese peasants (1600s),
blacks (1860s), italian immigrants (1911), the irish (1920s),
jews (1930s), blacks (1960s), the poor (always)
-----------------------------------------------------------------------
4 days until Benjamin Franklin's 307th Birthday