Re: [Mailman-Users] Purging old archives over 7 years old

2017-06-15 Thread Mark Dale
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/00.html
>   ./private/pc532/2017q2/date.html
>   ./private/pc532/2017q2/subject.html
>   ./private/pc532/2017q2/author.html
>   ./private/pc532/2017q2/thread.html
>   ./private/pc532/2017q2/01.html
>   ./private/pc532/2017q2/02.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


Re: [Mailman-Users] Purging old archives over 7 years old

2017-06-15 Thread Vincej, Dawn (GRC-VE00)[DB Consulting Group, Inc.]
We use a pruning script to remove older messages from archives located here:

https://www.msapiro.net/scripts/prune_arch



Dawn




On Jun 14, 2017, at 4:36 PM, Steven Jones 
mailto:steven.jo...@vuw.ac.nz>> 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).



regards

Steven
--
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/dawn.vincej%40nasa.gov

--
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


Re: [Mailman-Users] Purging old archives over 7 years old

2017-06-15 Thread Julian H. Stacey
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/00.html
./private/pc532/2017q2/date.html
./private/pc532/2017q2/subject.html
./private/pc532/2017q2/author.html
./private/pc532/2017q2/thread.html
./private/pc532/2017q2/01.html
./private/pc532/2017q2/02.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
-- 
Julian Stacey, Computer Consultant, BSD Linux Unix Systems Engineer
 Reply below, Prefix '> '. Plain text, No .doc, base64, HTML, quoted-printable.
 http://berklix.eu/brexit/#stolen_votes  Starve a troll: Ignore Trump's tweets.
--
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