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!

Purge all email from an inbox?

Discussion in 'E-mail Discussion' started by jsteel, Oct 6, 2003.

  1. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Atlanta, GA
    Does anyone know a quick way (preferably from the shell) to purge all email in a user's inbox, without 1) requiring a restart of the mail server and 2) without deleting and recreating the account?

    cPanel.net Support Ticket Number:
     
  2. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    460
    Likes Received:
    3
    Trophy Points:
    318
    Location:
    Vancouver, Canada
    I use echo -n > /home/username/domain.com/user/inbox

    No restart or recreation of the account ;)

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Atlanta, GA
    Thanks for thr input, however, the 'echo' command is essentialy just an alias for 'print'. That would do nothing to flush an inbox.

    cPanel.net Support Ticket Number:
     
  4. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    460
    Likes Received:
    3
    Trophy Points:
    318
    Location:
    Vancouver, Canada
    True. But "echo -n" prints a new line, or in this case overwrites the inbox file with a empty file that the same ownership and permissions as before. And as I said before, it does work. Why don't you just try it?

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    510
    Likes Received:
    5
    Trophy Points:
    168
    he is right,

    You can also just
    > inbox

    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