https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7675
Bug ID: 7675
Summary: The -D/--debug option is mis-parsed in sa-learn,
spamassassin, and possibly other scripts.
Product: Spamassassin
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P2
Component: spamassassin
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: Undefined
There is a logical error/pitfall in parsing the -D/--debug argument in AT LEAST
the spamassassin and sa-learn scripts which needs to be either fixed or
documented. If you do not follow the option with a list of debug channels,
another option, or '--' (indicating the end of options,) it MUST be the last
token on the command line. If there is one or more pathnames after --debug, the
first will be interpreted as a debug channel. I do not see exactly how this
could lead
Conversely, the documentation for sa-learn does not actually cover the use case
of feeding the messages to be learned to sa-learn via STDIN, although that does
work.
For 3.4.3 I think the best approach is to document that -D/--debug MUST have an
argument rather than saying it defaults to 'all' when in fact that does not
work in the sa-learn or spamassassin scripts if it is at all possible to
interpret the following command line token as a channel. It could be disruptive
in the terminal 3.x release to change the behavior, even if the existing
behavior is arguably a bug.
For 4.x we need to fix the behavior. Either remove the botched 'default to all'
implementation which is inconsistent with the implementation of an extensible
set of arbitrarily-named debug channels or fix the Getopt::Long-based command
line parser to detect when the token after -D/--debug is a pathname.
I ran across this while investigating bug 7674, which may or may not be
related.
--
You are receiving this mail because:
You are the assignee for the bug.