Opened 12 years ago

Closed 11 years ago

#190 closed enhancement (fixed)

Add command-line options to the Perl scripts

Reported by: rjl Owned by: rjl
Priority: low Milestone: 1.0.1
Component: Perl scripts Version: 1.0.0 RC5
Severity: minor Keywords: process-quarantine.pl expire-quarantine-cache.pl command-line
Cc:

Description

Some of the configurable behaviour of the various Perl scripts (e.g. process-quarantine.pl, expire-quarantine-cache.pl, etc.) is hard-coded at the beginnings of the scripts themselves, or read from database columns. For maximum utility however, it would be convenient to also let some of these things be set via command-line options.

If set on the command-line, such options would override any hard-coded defaults or database-sourced values, so for routine purposes (e.g. cron jobs) the scripts would be best run without any arguments, but for one-off administration purposes--like, say, purging X days worth of confirmed-but-unreported spam--command-line arguments would be highly convenient.

The expire-quarantine-cache.pl script, in particular, might be amended to allow the administrator to specify the types of mail items that should be expired--suspected ham/spam, confirmed ham/spam, viruses, banned files, bad header items, etc. (Currently, confirmed ham/spam items are not expired by this script at all--only process-quarantine.pl does this.)

Change History (4)

comment:1 Changed 12 years ago by rjl

Fixed for process-quarantine.pl in https://secure.renaissoft.com/cgi-bin/trac.cgi/changeset/619 619. Similar changes still need to be made to expire-quarantine-cache.pl.

comment:2 Changed 11 years ago by dmorton

  • Milestone 1.0.0 deleted

comment:3 Changed 11 years ago by rjl

  • Milestone set to 1.0.1
  • Status changed from new to assigned

comment:4 Changed 11 years ago by rjl

  • Resolution set to fixed
  • Status changed from assigned to closed
  • Type changed from defect to enhancement

Added command-line options for expire-quarantine-cache.pl in [995] and [996], to make it more flexible as an expiry tool. In addition to being able to control which types of items get expired, the script now supports the expiry of confirmed spam [C] and confirmed non-spam [G] items if desired (e.g. if process-quarantine.pl has not been run for a long time, and it becomes desirable to simply delete user-confirmed items). It shouldn't be necessary to do this with the new process-quarantine.pl script, but it's there as an option in any case.

Note: See TracTickets for help on using tickets.