[Mailman-Users] Purging old archives over 7 years old
mark at mailmanlists.net
Thu Jun 15 17:51:39 EDT 2017
We've found this to be useful.
"Using Archivemail to pruning Mailman archives"
On 15/06/17 23:05, Julian H. Stacey wrote:
> Steven Jones wrote:
>> I have a 12year old mailman server which is absorbing 650gb of expensive disk space. Is there any feature that would go through each list's archives and delete emails over say 7 years old? (or maybe even only 3 as we do a yearly backup going back a decade).
> I've no idea if mailman has own special tools for that,
> standard Unix tools can find tools that use the Unix find command, eg
> echo "Learn find, dialects vary per Unix."
> man find
> cd /usr/local/mailman/bin
> echo "Get an idea where to look:"
> find . -type f | sort | xargs grep -l find | more
> find . -type f | sort | xargs grep -l find \
> | grep -v /archives/ \
> | grep -v /lists/ \
> | grep -v /logs/ \
> | grep -v /messages/ \
> | grep -v /templates/ \
> | grep -v /tests/ \
> | more
> echo "Ignore ./cgi-bin/* binaries."
> vi -c/find `find bin/* scripts/* -type f | xargs grep -l find`
> echo "Also consider ./Mailman/*/*.py[c] files"
> Or more simply:
> cd /usr/local/mailman/archives
> find . -type f -name \*.html | more
> so eg
> rm -rf ./private/pc532/2007*
> find . -type f -name \*.html | xargs ls -l > ~/tmp/dates_to_browse
> find . -type f -name \[0-9\]\*.html
> find . -type d -name 2012q\* | more
> find . -type d -name 2012q\* | xargs rm -rf
> Find is very powerful. Read
> man find
> before you use find,
> before you use
> Do a backup before anything.
More information about the Mailman-Users