After enabling DoT10Stat, the Top Ten Statistics page (/top10stats)
remains empty in the GUI, even though spam is being blocked correctly
and the corresponding entries appear in maillog.txt.
The persistent counter files exist but stay at 1 byte (effectively empty):
-rw-r--r-- 1 assp assp 1 /usr/share/assp/tmpDB/files/T10StatD.sav
-rw-r--r-- 1 assp assp 1 /usr/share/assp/tmpDB/files/T10StatI.sav
-rw-r--r-- 1 assp assp 1 /usr/share/assp/tmpDB/files/T10StatR.sav
-rw-r--r-- 1 assp assp 1 /usr/share/assp/tmpDB/files/T10StatS.sav
The counters are never incremented, regardless of how many incoming
messages are blocked.
In sub T10StatAdd at line 55747 of assp.pl, the connection type
is compared using the numeric inequality operator != instead of
the string inequality operator ne:
sub T10StatAdd {
my $fh = shift;
return unless $fh;
return if $Con{$fh}->{type} != 'C'; # <-- bug
...
}
Because 'C' evaluates to 0 in numeric context, the expression
$Con{$fh}->{type} != 'C' is always true (assuming type holds a
non-zero value or any non-numeric string), and the function returns
immediately for every call. As a result, no counters are ever
incremented and the Top Ten statistic stays empty.
This is also inconsistent with other places in assp.pl where the
same comparison is done correctly with ne, e.g.:
21855: if (Con{
fh}->{type} ne 'C' || ...
22282: if (SessionLog > 2 && $Con{
fh}->{type} ne 'C') {
22317: if (Con{
fh}->{type} ne 'C' && ...
Replace != with ne on line 55747:
return if $Con{$fh}->{type} ne 'C';
After applying the fix locally and restarting ASSP (using
--nointchk:=1 because of the integrity check), incoming blocked
mails are correctly counted and the Top Ten Statistics page
populates as expected.
Reverting the change reproduces the empty-statistic behaviour.
Thanks for ASSP and for looking into this.
thank you,
this will be fixed in the next release
Thomas
Last edit: Thomas Eckardt 2026-05-11