Trash Can (Filter File) Manager
The “Trashman” is utility program that maintains filter files1) that contain date/time stamps (t=
) and (optionally) expiration values (e=
) on filter lines separated by TAB characters:
219.135.183.186^It=20250102T115506-0800^Ip=SMTP^Ir=3 FAILED LOGIN ATTEMPTS in 9.5h^Ie=20250402T125506-0800^Iu=jaguar@cvs.synchro.net^Ih=186.183.135.219.broad.gz.gd.dynamic.163data.com.cn
The date/time stamps and expiration date/times are automatically added to some filter files by Synchronet: ip.can
and spamblock.cfg
.
The Trashman will remove old filter lines from these files if they are expired (the e=
date/time has been reached) or the age of the line exceeds a specified maximum age (with the -a
option).
If just want to safely experiment with the utility, it does have a test mode option (-t
).
Usage
usage: trashman [-opt][...] /path/to/file1.can [/path/to/file2.can][...] options: -a<days> specify maximum age of filter items, in days -p<prot> only manage filters for specified protocol -t run in test (read-only) mode -v increase verbosity of output
Install
It's suggested to run this utility at least once a month via JSexec or the Synchronet Terminal Server Event Thread. This can be accomplished by adding it (if it doesn't already exist) to SCFG->External Programs->Fixed Events->Monthly:
Native Executable/Script | Yes |
Use Shell or New Context | Yes |
Command Line | %!trashman%. %z*.can %kspamblock.cfg |