The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to clean mailman archives in cPanel

Discussion in 'E-mail Discussions' started by SoftDux, Sep 9, 2011.

  1. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Hi,

    Does anyone know how to clean the mailman archives in cPanel?
     
  2. tecnotronico

    tecnotronico Active Member

    Joined:
    Apr 17, 2004
    Messages:
    28
    Likes Received:
    1
    Trophy Points:
    3
    You need to have root access to your server using SSH.

    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/
    cd listname_clientdomain.ext

    NOTE: replace listname_clientdomain.ext for your corresponding mailing list name and domain.

    Then delete the files related to your list executing (as an example):

    rm -fR 2009*
    rm -fR 2010*
    rm -fR 2011-Jan*
    rm -fR 2011-Feb*
    rm -fR 2011-Feb*
    rm -fR 2011-Mar*
    rm -fR 2011-Apr*
    rm -fR 2011-May*
    rm -fR 2011-Jun*
    rm -fR 2011-Jul*
    rm -fR 2011-Aug*
    rm -fR 2011-Sep*
    etc …

    In the example above we deleted all the archived files for 2009, 2010 and all month until September 2011.

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

    cd attachments
    tmpwatch --mtime --all 744 /usr/local/cpanel/3rdparty/mailman/archives/private/listname_clientdomain.ext/attachments

    NOTE: replace listname_clientdomain.ext for your corresponding mailing list name and domain.

    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.

    That's it.
     
    BluesBrother likes this.
Loading...

Share This Page