Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Cleaning out a mail box Via SSH?

Discussion in 'E-mail Discussion' started by Silverado, Apr 10, 2003.

  1. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Backyard - Poolside
    Does anyone know a good way to clean out a specific Email box using SSH? Or perphaps a script similar to the one used to wipe out the mail queue? I have a client that gets about 300MB of mail daily and he would like to wipe it out in one quick sweep.
    Any suggestions are appreciated...... other than the obvious of deleting the email account. Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. webtec

    webtec Member

    Joined:
    Apr 18, 2002
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    301
    What I've done in the past is simply null the file.

    At a command line type:

    >inbox

    This will empty the box.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Backyard - Poolside
    could you possibly expound on this a bit. >inbox ---- I don't see how this will do any good from the root prompt? Or are you perhaps meaning add that to the path to the inbox.... LOL... if I ever find the inbox path in ssh.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Damian

    Damian Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    100
    Likes Received:
    6
    Trophy Points:
    318
    You can just delete the inbox file, it will be recreated when needed.

    The main account's inbox is located here:

    /home/username/mail/

    So to delete it issue:

    rm /home/username/mail/inbox

    Additional users & addon domain users are located here:

    /home/username/mail/domain.com/user
    /home/username/mail/addondomain.com/user

    The same applies to delete them:

    rm /home/username/mail/domain.com/user/inbox
    rm /home/username/mail/addondomain.com/user/inbox
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice