Could you range by ALPHA order lists (whitelist etc...)
With the time, i'd put many entries into whitelists...and other list, and i saw i have often entries in double or more.
If you have a way to range them by alfa order, after whitelist to or whistlist for "terms", it could be better
MDaemon 13.5.0 now includes an option to allow the spam filter whitelists and blacklists to be organized alphabetically.
Bram Borgers commented
I think, I once asked our engineer why he didn't sort the alias list when we were searching for it.
I think that was in Web admin part. If you can solve this in the white and black list please look in to other parts of the software as well. but it is no big issue. Then again it will not take much time to program.