Warning: 2015-10-19: Major upgrade in progress. Site somewhat functional, with bugs...


sympa-archives-expire is a bash script to remove SYMPA mailing lists old archives based on expiration dates. SYMPA is a very nice mailing list system, which provide nice web archives by using http://www.mhonarc.org/ MHonarc. To keep things manageable, it actually sets up a separate MHonarc repository per month. SYMPA provides a way to make subscribers expire, but nothing is none for the archives. This is not a problem in general, as emails consume little space, but can be problematic for lists used to send a lot of attachments (think of MS Office documents like powerpoints), or automated build or test reports or big logs.

This script has a granularity of one month: it can only remove one month at a time. It works by being run daily under the sympa login in a crontab (e.g.: 01 01 * * * /usr/local/bin/sympa-archives-expire ), without arguments. By default it do not expire lists, it just reads the file /etc/sympa-archives-expire to find the name of archives to expire, one per line, optionally followed by the number of full months to keep. Full usage is obtained by ruinning it with the argument -? :

# sympa-archives-expire -?
sympa-archives-expire [options] arguments ...
reads a config file (default: /etc/sympa-archives-expire) and removes old 
archives for the listed SYMPA mailing lists.
See http://colas.nahaboo.net/Software/SympaArchiveExpire

The file should list the SYMPA mailing list archives to expire after N months
in the form:
  listname@hostname N
N is optional (default 1) and mean the number of full month archives to keep
  e.g. if N=2, the current month and the full two months before will be
  kept, older ones will be deleted
lists not listed in this file never expire
empty lines and lines beginning with # are ignored

The file should be run under the sympa account, once a day

  -c FILE   Uses FILE instead of /etc/sympa-archives-expire
  -d DIR    Sympa installation dir, defaults to /home/sympa
  -n        Do not perform cleanups, just list what it would have done

Future work

This script works on our systems at work, but we are still in SYMPA v3 and I do not think we will upgrade. So I do not plan to work on it anymore. Moreover, this functionality is part of sympa (as the http://www.sympa.org/manual/parameters-archives#web_archive.max_month max_month variable) since SYMPA 5.2.


  • 1.0 2009-03-14 First release


Topic revision: r14 - 16 Mar 2009, ColasNahaboo
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Colas? Send feedback