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.

redundant mail account dirs - script to detect and delete?

Discussion in 'E-mail Discussions' started by spaceman, Dec 5, 2005.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Hi All,

    I'm looking at the mail dir for one of our hosting accounts:

    /home/accname/,ail/domainname/

    In there are lots of old dirs (with 2004 and 2003 dates next to them) that do not have a corresponding mail account as far as cPanel is concerned (mail > manage/add/remove accounts).

    I can only assume that these old dirs / folders where not correctly deleted (for whatever reason) when the account was terminated via manage/add/remove accounts in cPanel.

    I'm assuming that many of our hosting accounts might be affected by this problem, and therefore would like to tidy this up.

    Short of going through every host accounts and making the comparison manually, does anyone know if there's a script that will (reliably!!) rip through a cPanel/WHM server, and auto-deleting any redundant mail dirs?

    Thanks.
     
Loading...

Share This Page