Re: HTML_FONT_SIZE_HUGE firing on html that looks ok
Matija Nalis <[email protected]> Tue, 12 May 2026 15:41:59 +0200
| Newsgroups | gmane.mail.spam.spamassassin.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the check, Andrew.
Armed with that knowledge, I've taken a look at differences beween SA
3.4.6 and 4.0.2, and indeed it seems that a compatibility-breaking
change was introduced (I'm guessing in order to support more modern
font sizes; but I have not dug deeply):
< $self->{max_size} = 3; # start at default size
< $self->{min_size} = 3; # start at default size
> $self->{max_size} = 16; # start at default size
> $self->{min_size} = 16; # start at default size
Using of SAME eval names to mean DIFFERENT things was unfortunate, as
that means that ANY rules using eval:html_range('max_size', ... ) or
eval:html_range('min_size', ...) will have their compatibility broken
(i.e. if they worked in 3.4 it will break in 4.0, and vice versa).
IMHO, the best solution would be for 4.x codebase to create separately
named evals for 4.0.x sizes, e.g. `min_size_pt` and `max_site_pt`
and then have rules:
body HTML_FONT_SIZE_HUGE_LEGACY eval:html_range('max_size', '6', 'inf')
body HTML_FONT_SIZE_HUGE_PT eval:html_range('max_size_pt', '24', 'inf')
meta HTML_FONT_SIZE_HUGE HTML_FONT_SIZE_HUGE_LEGACY || HTML_FONT_SIZE_HUGE_PT
etc.
that way official rules (and their updates) will continue to work in both SA 3.4
and post-4.0.2 (and only 4.0.0-4.0.2 would remain broken).
Someone should open a bugzilla issue (and mention it here, so
interested parties may follow. I unfortunately can't do it at the
moment)
On Tue, May 12, 2026 at 10:06:14AM +0100, Andrew C Aitchison wrote:
>
> I can reproduce on Ubuntu 26.04 with spamassasin 4.0.2.
>
> On Tue, 12 May 2026, Matija Nalis wrote:
>
> >
> > On Mon, May 11, 2026 at 09:54:23PM -0400, Greg Troxel wrote:
> > > Matija Nalis <[email protected]> writes:
> > >
> > > > On Mon, May 11, 2026 at 06:45:03PM -0400, Greg Troxel wrote:
> >
> > > It's a problem because it's asserting something about the message that
> > > is not true and makes no sense. That's a bug even if the default config
> > > only counts it for one millipoint.
> >
> > I would agree that is a bug; but I can't reproduce your problem in my
> > environment.
> >
> > > Thanks for pushing me to do that. I went through and trimmed and
> > > trimmed, checking each time, and converted identifiers to dummy values.
> > > The result is super short and it still fires.
> >
> > > But the big deal is I'm still getting HTML_FONT_SIZE_HUGE.
> >
> > That definitely sound wrong; that example of your (while it has HTML)
> > has nothing font-related, so i wouldn't expect HTML_FONT_SIZE_HUGE to
> > trigger.
> >
> > The HTML_FONT_SIZE_HUGE is NOT triggering on my SA 3.4.1 with your
> > ham.000 (only HTML_MESSAGE and DMARC/etc stuff is).
> >
> > I know this might sound annoying (that is not my intention!); but are you sure that:
> >
> > - this is really the exact file you've checking with "spamassassin -D -t" ?
> > - that something in your extra rules did not override HTML_FONT_SIZE_HUGE test?
> >
> >
> > > May 11 21:50:45.236 [29438] dbg: rules: ran eval rule HTML_FONT_SIZE_HUGE ======> got hit (1)
> > >
> > > SA 4.0.2, perl 5.42.2, NetBSD 10 amd64. sa-update nightly: rule files
> > > have mod time of 0500 EDT today. This setup otherwise works well.
> >
> >
> > Well, maybe someone with SA 4.0.2 can check how it behaves for them;
> > maybe it's a bug there (maybe only on NetBSD?)
> >
> > If I were you, I'd:
> >
> > - wait a little if someone can reproduce the issue with SA 4.0.2
> >
> > - if nobody reproduces the bug, I'd setup a new NetBSD VM with
> > completely bare SA (i.e. no custom rules / extra plugins) and try
> > to reproduce problem there:
> >
> > - if you can't reproduce the bug there, there there is something in
> > your custom setup that is broken, and you need to track it down
> > by looking at differences to pristine SA (change by change)
> >
> > - however if bug is successfully reproduced in pristine NetBSD
> > Spamassassin 4.0.2, I'd fire up my editor and start adding dbg()
> > statements in that Mail/SpamAssassin/HTML.pm in anything
> > mentioning "size" (i.e. sub text_style() primarily) until I found
> > out what exactly is changing those $self->{max_size} and/or
> > $self->{min_size})
> >
> > If you get to this point but don't know what to add, ask and I'll
> > try to help.
> >
> > --
> > Opinions above are GNU-copylefted.
> >
>
> --
> Andrew C. Aitchison Kendal, UK
> [email protected]
--
Opinions above are GNU-copylefted.