[Mailman-Users] Purging old archives over 7 years old
Mark Dale
mark at mailmanlists.net
Thu Jun 15 17:51:39 EDT 2017
Hi,
We've found this to be useful.
"Using Archivemail to pruning Mailman archives"
https://playingwithsid.blogspot.se/2014/03/using-archivemail-to-pruning-mailman.html
Best,
Mark
On 15/06/17 23:05, Julian H. Stacey wrote:
> Steven Jones wrote:
>> Hi,
>>
>>
>> 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
> ./private/pc532/index.html
> ./private/pc532/2017q2/000000.html
> ./private/pc532/2017q2/date.html
> ./private/pc532/2017q2/subject.html
> ./private/pc532/2017q2/author.html
> ./private/pc532/2017q2/thread.html
> ./private/pc532/2017q2/000001.html
> ./private/pc532/2017q2/000002.html
>
> 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,
> use
> more
> before you use
> rm
> Do a backup before anything.
>
> Cheers,
> Julian
>
More information about the Mailman-Users
mailing list