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
> 
------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to