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!

how to remove emails via ssh

Discussion in 'E-mail Discussion' 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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,651
    Likes Received:
    73
    Trophy Points:
    328
    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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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