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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to remove emails via ssh

Discussion in 'E-mail Discussions' started by ccccanada, Aug 12, 2003.

  1. ccccanada

    ccccanada Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    166
    can someone please tell me how to empty an email account that has 11000 emails in it from ssh.

    what would be the command to empty a certain users emailbox.

    Thanks

    cPanel.net Support Ticket Number:
     
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    166
    Code:
    echo -n > /home/USERNAME/mail/DOMAIN.COM/MAILUSER/inbox
     
  3. ccccanada

    ccccanada Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    166
    Thank you!

    I have been searching everywhere to find that.
    It works great.

    cPanel.net Support Ticket Number:
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,447
    Likes Received:
    35
    Trophy Points:
    178
    cPanel Access Level:
    Root Administrator
    You should be able to use just

    Code:
    >/home/user/mail/domain.com/mailbox/inbox
    
    but the above line should work as well.

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  5. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    166
    There's a reason for the echo -n, I didn't just write it because I was feeling good about myself.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page