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!

nuke a mailbox (new mail type)

Discussion in 'E-mail Discussion' started by simonpearce, Dec 4, 2006.

  1. simonpearce

    simonpearce Well-Known Member

    Joined:
    Jun 20, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    When a user had thousands of messages in their mailbox, we used to be able to echo -n>inbox to empty them all out; this doesn't work with the new mail system.

    When I try rm -rf * in the /cur and /new directories I get:

    Code:
    -bash: /bin/rm: Argument list too long
    Any suggestions please?

    Cheers

    Simon
     
  2. Romka_

    Romka_ Member

    Joined:
    Dec 28, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    151
    !

    You can delete this directories and recreate itself.

    rm -rf cur; mkdir cur
    etc....

    But you must first look for owner and group for this folders and change it after recreate.

    This is my method.
     
    #2 Romka_, Dec 4, 2006
    Last edited: Dec 4, 2006
  3. Romka_

    Romka_ Member

    Joined:
    Dec 28, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    151
    This is example from my box where i`m use postfix.

    Code:
    #!/usr/local/bin/bash
    
    echo "Postfix - STOP"
    /usr/local/sbin/postfix stop
    
    echo "Remove curent folders..."
    rm -rf /usr/spool/postfix/defer
    rm -rf /usr/spool/postfix/deferred
    rm -rf /usr/spool/postfix/active
    
    echo "Create new folders..."
    mkdir /usr/spool/postfix/defer
    mkdir /usr/spool/postfix/deferred
    mkdir /usr/spool/postfix/active
    
    echo "Change permition for folders..."
    chown -R postfix:postfix /usr/spool/postfix/defer
    chown -R postfix:postfix /usr/spool/postfix/deferred
    chown -R postfix:postfix /usr/spool/postfix/active
    
    echo "Postfix - START"
    /usr/local/sbin/postfix start
    
    
     
  4. simonpearce

    simonpearce Well-Known Member

    Joined:
    Jun 20, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    156
    Would "Repair Mailbox permissions" in WHM fix the permissions????
     
  5. lostinspace

    lostinspace Well-Known Member

    Joined:
    Jul 19, 2003
    Messages:
    122
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Colorado Springs, CO
    http://www.configserver.com/cp/cmm.html might make your life easier.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. simonpearce

    simonpearce Well-Known Member

    Joined:
    Jun 20, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    156
    This is brilliant - simple to install - simple to use - deleted 64000 messages from a mailbox in just a few seconds!

    Would highly recommend.
     
  7. lostinspace

    lostinspace Well-Known Member

    Joined:
    Jul 19, 2003
    Messages:
    122
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Colorado Springs, CO
    Tip of the iceberg my friend. You should check out Chirpy's CSF...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. bear

    bear Well-Known Member

    Joined:
    Sep 24, 2002
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    We're loving Chirpy's scripts. Definitely another fine one from him..thanks, Jon!
     
  9. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    537
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    csf cse cmm mailscanner - a must for every web server. rocks.
     
    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