]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] autolearnstats: add --sort-by and --group options 6050/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Thu, 21 May 2026 08:34:30 +0000 (11:34 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Thu, 21 May 2026 09:08:03 +0000 (12:08 +0300)
commitae485764cb9f564e250e06a700dcc13f88bdec93
tree05c572d616d5a207c3efe822960e443e7babdd9d
parent27b1595dd0c3d2ec7bb718118e56abbed7b49240
[Feature] autolearnstats: add --sort-by and --group options

Add --sort-by <col> to sort rows by a chosen column (verdict, score,
ts, tid, ip, from, rcpts) with timestamp as a tiebreaker.  Score is
compared numerically; all other columns lexicographically.

Add --group flag to insert a blank separator line between consecutive
rows where the --sort-by key changes.

Add unit tests for sort key extraction functions.
lualib/rspamadm/autolearnstats.lua
test/lua/unit/autolearnstats.lua