bugzilla-daemon at bugzilla
Jun 26, 2012, 9:32 AM
Post #1 of 1
[Bug 6811] New: Add option to sa-learn (and ArchiveIterator) to override a built-in message size limit
Bug ID: 6811
Assignee: dev [at] spamassassin
Summary: Add option to sa-learn (and ArchiveIterator) to
override a built-in message size limit
Reporter: Mark.Martinec [at] ijs
Version: SVN Trunk (Latest Devel Version)
When feeding some freshly hand-collected spam folder to sa-learn
I'm sometimes dismayed that messages larger than 256 KiB are ignored
unconditionally, even though they could sometimes offer a good
contribution to a set of tokens in Bayes.
It would be nice to be able to override a built-in size limit
of 256 KiB in ArchiveIterator, or just to disable it form a
command line option to sa-learn.
There was a somewhat related ticket:
Bug 4976 - increase default msg size limit from 250KB
which resulted in bumping up the size limit in spamc, but
ignored an equivalent limit in ArchiveIterator.
Attached is a proposed patch. It adds:
- a command line option --max-size to sa-learn (same option name as in spamc),
- option 'opt_max_size' to ArchiveIterator's contructor (and implements it),
- preserves option 'opt_all' for compatibility, but implements it
through 'opt_max_size' to simplify conditionals in loops,
- enhance some size-related debug log entries in ArchiveIterator,
- drops line-based limit approximation in some code paths of
ArchiveIterator by an exact byte-size limit as in other code sections.
You are receiving this mail because:
You are the assignee for the bug.