Results 1 to 7 of 7

Thread: Mass Delete of Email

  1. #1
    Registered Member
    Join Date
    Mar 2003
    Posts
    15

    Default Mass Delete of Email

    My default email address is set to :fail: So all unrouted email bounces back. Now I checked the email the other day and I have about 20,000 emails sitting there, from errors, boounces, and spam. How can I clear out the whole mailbox? Deleting them 50 at a time is too slow, and further more how can I block these from accumulating?

    Cheers

  2. #2
    Registered Member This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,499

    Default

    Two ways:

    1. Via cPanel, File Manager > mail > domain.com > username > inbox > Delete File

    2. Via SSH

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


    You'll then have a nice empty inbox

    Btw, if you only have one account and it is the main account, then the inbox may be at /home/account/mail/inbox
    Jonathan Michaelson

    cPanel Server Configuration, Security and Antivirus/AntiSpam Services
    http://www.configserver.com

  3. #3
    Registered Member
    Join Date
    Nov 2003
    Location
    Portugal
    Posts
    78

    Question

    is there any similar process to email accounts ?
    Best Regards,
    Luis

  4. #4
    Registered Member This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,499

    Default

    I don't understand the question, can you explain in a bit more details what you're wanting to do?
    Jonathan Michaelson

    cPanel Server Configuration, Security and Antivirus/AntiSpam Services
    http://www.configserver.com

  5. #5
    Registered Member
    Join Date
    Nov 2003
    Location
    Portugal
    Posts
    78

    Default

    i have the next email accounts created on cpanel:

    spam1@domain.com
    spam2@domain.com
    (...)
    spam12@domain.com
    john@domain.com
    company1@domain.com
    company2@domain.com
    (...)
    company20@domain.com

    is there an way the delete all the spam* and company* email accounts with one single click/command ?
    Best Regards,
    Luis

  6. #6
    Registered Member bijo's Avatar
    Join Date
    Aug 2004
    Location
    India
    Posts
    475

    Default

    Quote Originally Posted by kahoz
    i have the next email accounts created on cpanel:

    spam1@domain.com
    spam2@domain.com
    (...)
    spam12@domain.com
    john@domain.com
    company1@domain.com
    company2@domain.com
    (...)
    company20@domain.com

    is there an way the delete all the spam* and company* email accounts with one single click/command ?

    Hello,

    Go to
    cd ~username/mail/domain.com
    rm -rvf spam*
    rm -rvf company*

    It will help you. Let me know the status.
    Bijo
    Yahoo: "bijo505"
    Msn: "bijo_baby@hotmail.com"
    AIM: "bijobaby"

    http://slashome.com

  7. #7
    Registered Member This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,499

    Default

    You'd need to do a bit more than that - you'd have to remove the entries in /home/webumake/etc/webumake.net/passwd and /home/webumake/etc/webumake.net/shadow and /home/webumake/etc/webumake.net/quota. It's probably best to simply go through and delete them one by one.
    Jonathan Michaelson

    cPanel Server Configuration, Security and Antivirus/AntiSpam Services
    http://www.configserver.com

Similar Threads

  1. Mass delete e-mail accounts script
    By quizknows in forum Workarounds
    Replies: 1
    Last Post: 01-30-2014, 07:27 AM
  2. Mass delete IPs?
    By Zion Ahead in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 04-06-2010, 08:20 AM
  3. Mass delete email accounts
    By RobertLawrence in forum Feature Requests for cPanel & WHM
    Replies: 0
    Last Post: 11-13-2009, 10:33 AM
  4. Mass delete E-mail Accounts
    By Lightninghawk in forum E-mail Discussions
    Replies: 7
    Last Post: 09-04-2009, 09:09 AM
  5. boxtrapper - mass delete feature
    By DogTags in forum cPanel Developers
    Replies: 3
    Last Post: 03-25-2005, 10:44 AM
bargain