Am 2022-05-14 22:02, schrieb bugzilla-dae...@spamassassin.apache.org:
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7992
--- Comment #7 from Henrik Krohns <apa...@hege.li> ---
(In reply to Michael Storz from comment #6)
I think the settag command is easier to understand for the user
because it
is so similar to the header and body commands.
But how would it even work? How does settag know if user wants to
capture from
header, body, rawbody, full or uri? Would you want to pollute namespace
further
with settag_body commands or strange tflags? For me the named capture
is so far
much cleaner and plugs directly into existing Check.pm rule logic.
Priority/dependency problems remain.
Well, settag supports body, rawbody, full, header and tag. It does not
support uri, because Conf.pm has
# we don't do URI evals yet - maybe later
# if (/^uri\s+(\S+)\s+eval:(.*)$/) {
# $self->{parser}->add_test ($1, $2, $TYPE_URI_EVALS);
# next;
# }
and I'm using the evals for my implementation.
In addition settag supports priority.
If you have several captures in the regexp settag makes an array out of
the captures. And because compile_regexp does not support the modifier g
you can request that behavior with tflags multiple.
However, if you want to go
the capture group direction, then at least use it to set a tag and do
not
invent a new kind of variable
Did you even read my list message where I'm suggesting that variables
and tags
should probably be one and the same thing?
I am able to read, but at the time of my reply they were not the same!
Michael