Thursday, 12 December 2013

Mailmom archive deleting

The commands required to clean the mailman archives and attachments disk space are:

1. To clean the old archives (keeping just the last 3 months):

cd /usr/local/cpanel/3rdparty/mailman/archives/private/awg_abcd.org.uk

PS: replace awg_abcd.org.uk with the corresponding mailing list name and domain.

Then delete the files related to the list executing (as an example):
rm -rf 2009*
rm -rf 2010*
rm -rf 2011-Jan*
rm -rf 2011-Feb*

In the example above we deleted all the archived files for 2009, 2010 etc

2. To clean the attachments (keeping just the last 3 months):
cd attachments

tmpwatch --mtime --all 744 /usr/local/cpanel/3rdparty/mailman/archives/private/awg_abcd.org.uk/attachments
3. To clean the cache for mailman once done the previous two steps please run:
/scripts/update_mailman_cache
So, you will see the right quota at the account disk space used.

No comments:

Post a Comment