SA Bugzilla – Bug 6092
Empty 'X-Spam-Level:' header
Last modified: 2011-11-05 21:59:05 UTC
The 'X-Spam-Level:' header (as returned by spamc) is empty when the score is too low (otherwise is gets a x number of asterixes). While in the scictest sense not 'verboten', an empty header certainly is ugly. Perhaps a simple solution would be not to return the header at all when empty?
It's just a default. From 10_default_prefs.cf add_header all Level _STARS(*)_ You are free to tweak this to your likings. See the Mail::SpamAssassin::Conf [1] documentation, section Basic Message Tagging Options. In particular, adding this custom option to your local.cf site config will do what you want: remove_header ham Level Closing, unless someone feels strongly about breaking established behavior and not showing empty headers by default. This is not a bug, but a documented configura- tion option. [1] http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html
I know about that config option. :) Point is/was, that I don't want the X-Spam-Level header removed altogether, but ONLY when it has nothing to show for (no asterixes). Besides, it's not the first time I've see mail (header) parsers trip over empty headers, as they're trying to split matters into neat key,value pairs.
> Point is/was, that I don't want the X-Spam-Level header removed altogether, > but ONLY when it has nothing to show for (no asterixes). There is a difference between a header field not present (i.e. no spam checking done) and an empty header field body (score below 1). > Besides, it's not the first time I've see mail (header) parsers trip over > empty headers, as they're trying to split matters into neat key,value pairs. If they trip over such triviality, I'd rather not imagine what they do with parsing a From header field with display names and comments, nested comments, folding, all-whitespace lines in a header section, ... Avoid.
(In reply to comment #2) > Point is/was, that I don't want the X-Spam-Level header removed altogether, but > ONLY when it has nothing to show for (no asterixes). Oops, you're right, the option in comment 1 removes that header for all ham below required_score, not below one. Sorry, haven't had my second coffee yet.
*** Bug 6692 has been marked as a duplicate of this bug. ***
Reasoning behind 6692 was different and 6692 does not ask for change of behavior of already existing add_header Sometimes I would like to get details about so me test/procedure but I would not like to "waste" space for empty headers e.g. no X-SPAM-Language when no language has been detected (e.g. image spam) no X-Spam-AWL when no whitelisting has occured
(In reply to comment #6) > Reasoning behind 6692 was different The reasoning in comment 3 directly applies to bug 6692 as well. There is a difference between an empty and a missing header. > no X-SPAM-Language when no language has been detected (e.g. image spam) > no X-Spam-AWL when no whitelisting has occured Absence of these headers render "not identified, no action taken" and "failure" indistinguishable. An empty Language header means, no language has been identified. A conditionally removed empty header might mean exactly that -- though also may be due to mis-configuration or a failure of the relevant plugin. If you feel strongly about bug 6692, and believe it should be addressed regardless of the previous reasoning, feel free to re-open it. IMHO it is a dupe and basically the same as this bug, but that's my opinion and not necessarily the ultimate last word.