ngbatch project is a newgroup/rmgroup batcher for INN.
Version: 1.0ngbatch project is a newsgroup/rmgroups batcher for INN.
License: Public Domain
Operating System: Linux
< ngbatch -n > < group > [ < flag > [ < creator > ] ]
< ngbatch -r > < group >
< ngbatch -e > [ < -D > ] [ < -w > < days > ] [ < -h > < days > ]
This program executes newgroup and rmgroup controls in a delayed way, to help against newgroup/rmgroup wars. The idea is that (a) rmgroups are remembered for some time, and (b) rmgroups get priority over newgroups, so that a newgroup will be ignored if a rmgroup for this group (from a trusted issuer) has already arrived. A newgroup is executed only after a wait period, in case it gets rmgrouped soon.
Each newgroup/rmgroup control message is written into a batch file. A cron job collects commands from this batch file and executes only those newgroups for which no rmgroup was received.
Change your control scripts for newgroup and rmgroup so that they call B< ngbatch > with the appropriate parameters instead of B< ctlinnd > (you probably should make that depend on hierarchies). Make sure that only trusted rmgroupers are active in the I< control.ctl > file.
Run < ngbatch -e > periodically from crontab.
< -n > < group > [ < flag > [ < creator > ] ]
Batch up a newgroup control for < group >. < flag > defaults to "y", < creator > defaults to nothing.
< -r > < group >
Batch up and execute a rmgroup control for < group >.
< -e >
Execute a batch run: for all batched newgroup commands, check if the wait time has elapsed. If yes, execute the newgroup command only if no rmgroup for the same group was batched. Rewrite the batch file with the commands still to be remembered.
< -D >
Show the commands on standard output instead of executing < ctlinnd >.
< -w> < days >
Set the newgroup wait time to < days > (default 3).
< -h > < days >
Set the rmgroup remember time to < days > (default 30).