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!

delete emails from shell

Discussion in 'E-mail Discussion' started by Valuehosted, Jun 26, 2004.

  1. Valuehosted

    Valuehosted Well-Known Member

    Joined:
    Dec 12, 2002
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Sweden
    I have a couple of users with previous default emails to useraccount, since then changed but I need to delete the emails in the email accounts manually from shell.

    I know this is possible from shell but I forget how to; anyone?

    Thanks,

    --Tone
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    If you simply want to remove all the emails from their inbox, then you can:

    cd /home/account/mail/domain.com/username/
    or
    cd /home/account/mail/
    cat /dev/null > inbox

    If you want to delete individual mails (which you probably don't) then you can do so with:

    cd /home/account/mail/domain.com/username/
    or
    cd /home/account/mail/
    mail -f inbox

    which puts you into mail (? for help).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Valuehosted

    Valuehosted Well-Known Member

    Joined:
    Dec 12, 2002
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Sweden
    Jonathan,

    awesome - that did it - THANK YOU!

    --Tone
     
    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