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.

How to delete very large email boxes.

Discussion in 'E-mail Discussions' started by mm1250, Jun 2, 2007.

  1. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    I have several accounts on my server which have large emails sitting waiting to be downloaded. IT seems to be the default account for the domain. One pitcular user has over 300ish MB of email waiting to be downloaded into outlook. Since it is all junk, how can I delete this without spending 9hours downloading it into OUtlook? I was able to fix the default email routing now so that it discards and fails the message vs sending it to the root account. But now I got to clean out the account.

    Thanks
     
  2. eNetHosts

    eNetHosts Well-Known Member

    Joined:
    Apr 21, 2007
    Messages:
    195
    Likes Received:
    0
    Trophy Points:
    16
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Login through ssh and cd to clients mailbox and run:
    Code:
     echo -n > inbox
    This will delete the contents while keeping the file.
     
  4. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Where is this file located at?

    Sorry, but i'm very new to this so I don't know where the inbox files are stored.
     
  5. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    There are over 188,000 emails so I had trouble doing this via Squiralmail/ Horde and OUtlook.

    The problem was I had a cron job running and I set the email to /dev/null. I thought the emails were getting discarded until I found that the cronjob was trying to email /dev/null@domain.com and caused a bunch of bounchbacks every 2mins for hte last 6months. AS you can see it got failry large.
     
  6. eNetHosts

    eNetHosts Well-Known Member

    Joined:
    Apr 21, 2007
    Messages:
    195
    Likes Received:
    0
    Trophy Points:
    16
    Nasty,

    I've PM-d you with a possible solution involving us. We'll wait to hear from you.
     
  7. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    There has to be a easier way to do this than to manually download them. If they were sub-email accounts it would be pretty easy, just delete the email account and re-create it. But since this account is the main account for the domain, I can't delete it. Can someone please help me. I have around 4 domains like this, i'm sure hundreds of people ran into this before.
     
  8. eNetHosts

    eNetHosts Well-Known Member

    Joined:
    Apr 21, 2007
    Messages:
    195
    Likes Received:
    0
    Trophy Points:
    16
    Being as root emails are generally only for mail involving cPanel quite a few times people just disable the cron and leave the mail where it is, due to the time it would take to delete them.

    Now cron emails aren't really that big so the impact on disk space when you have a large HDD would be minimal at most.

    However not knowing the inner workings of Horde personally. My guess would be there would have to be a large file in /mail/ or emails stored in a db where you could mass delete through phpMyAdmin.

    Any other ideas anyone?
     
  9. bornonline

    bornonline Well-Known Member

    Joined:
    Nov 19, 2004
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    #9 bornonline, Jun 2, 2007
    Last edited: Jun 2, 2007
  10. bornonline

    bornonline Well-Known Member

    Joined:
    Nov 19, 2004
    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    Yeah.. I posted the wrong thing first. This should do what you want.

     
  11. eNetHosts

    eNetHosts Well-Known Member

    Joined:
    Apr 21, 2007
    Messages:
    195
    Likes Received:
    0
    Trophy Points:
    16
    Possibly, but if the mails already in the inbox
     
  12. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Its either in /home/user_name/mail/inbox or /home/user_name/mail/cur depending on your mail set up.
     
  13. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet
    login via ftp and clean mail box

    hi,
    yes you should be able to locate the mail folder inside the file manager or from ssh, just delete the file inside inbox of the required mailbox and you are done.

    when i login to my account from ftp i see this:-

    /mail/mydomain.com/bbox/new
    where mail is a folder inside my home dir.
    mydomain.com is example domain
    bbbox is the mailbox i want to clear
    new is the folder having new mails


    and i delete file like

    1080772109.H581858P2315.serv.myhostname.com
    you can do so from ftp account easily.

    use at your own risk.

    see ya,
    mohit
     
    #13 mohit, Jun 2, 2007
    Last edited: Jun 2, 2007
  14. metsfan

    metsfan Registered

    Joined:
    Nov 11, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I'll second this. I used it recently to delete some big mailboxes.
     
  15. WhmSonic

    WhmSonic Well-Known Member

    Joined:
    Mar 19, 2007
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hello,
    Login to your root ssh:
    Code:
    rm -f /home/username/mail/inbox
    touch /home/username/mail/inbox
    chown -R username:username /home/username/mail/inbox
    done.
     
  16. kamraonline

    kamraonline Member

    Joined:
    Aug 15, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page