|Main Archive Page > Month Archives > spamassassin-dev archives|
--- Comment #3 from Karsten BrÃ¤ckelmann <firstname.lastname@example.org> 2011-11-06 00:03:22 UTC ---
(In reply to comment #2)
> 6092 is about changing behavior of add_header unconditionally.
> 6692 is about providing user with option to change behavior in SOME cases by
> supporting new add_header_cond.
So there are two Template Tags in your proposed new option. One being the
conditional to test for emptiness, one being the actual header's value.
This seems slightly redundant, unless specifically intended to also support
weird edge cases:
(a) Adding a header with a value of _BAR_ based on the template tag expansion
add_header_cond all _FOO_ _BAR_
In particluar this scenario can result in seriously confusing header's
added, and even in adding an empty header.
(b) Additionally add static text to the header's value.
add_header_cond all _FOO_ "This header's value is _FOO_"
Unless one these really is desired, I'd propose to drop the condition and add
the header based on it's value being empty or not.
add_header_cond all Languages _LANGUAGES_
An alternative would be, to implement an option to remove headers if empty.
add_header all Languages _LANGUAGES_
hack_header all Languages
The first option is the traditional, unconditional add_header, or possibly the
default as with the Level header. The second marks the header for suppression,
if empty. This also works out of the box with stock headers, without resorting
to the remove_header option.
I can offer a hack-ish proof-of-concept implementation (hence the option's
name) for this concept, which I wrote quite a while ago. Probably needs
re-view, though, haven't used it in a while.
-- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.