https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6703

--- Comment #33 from Mark Martinec <[email protected]> ---
> Patch committed.

This doesn't work as intended, sa-learn now rejects most messages
as oversized.

The problem is that mbox_format_from_regex in Conf.pm defaults to
an empty string, but _set_default_message_selection_opts() tests
for undef, so the regexp in $self->{opt_from_regex} remains an
empty string, which according to some bizarre Perl brain damage
defaults to a last regexp that matched, so the ArchiveIterator
keeps finding huge messages.

The fix is trivial, just removing the  default => ''
from the Conf.pm entry on a config option 'mbox_format_from_regex'.

Also I think the /$self->{opt_from_regex}/ in sub _run_mailbox
could deserve an /o flag, as I don't think its value can change
once it has been set and was used for the first time.

Btw, while investigating why sa-learn broke I ended up in
letting ArchiveIterator and sa-learn be able to take a message
size limit option. Will open a separate ticket for this.


  Sending ArchiveIterator.pm
  Sending Conf.pmT
Committed revision 1354072.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to