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.

Purge all email from an inbox?

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

  1. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    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:
    451
    Likes Received:
    2
    Trophy Points:
    18
    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:
     
  3. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    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:
    451
    Likes Received:
    2
    Trophy Points:
    18
    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:
     
  5. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    he is right,

    You can also just
    > inbox

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page