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.

Cleaning out a mail box Via SSH?

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

  1. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  2. webtec

    webtec Member

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

    At a command line type:

    >inbox

    This will empty the box.
     
  3. Silverado

    Silverado Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  4. Damian

    Damian Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    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