How to remove emails in CENTOS using command line?

0

I have a server running CentOS on which I have root privileges.
One of my users has almost 228932 emails in an inbox, consuming 5 GB of space.

How can I remove emails using command line?
The normal email delete methods will take lot of time.

NEW EDIT

I have found the path like

mail/website.com/emailaccount/new

Can I delete the emails from here ?

Yogus

Posted 2013-08-14T07:06:54.263

Reputation: 1 676

I have no idea :( Its cpanel software and default Horde software is used to access the mails. – Yogus – 2013-08-14T07:10:42.513

@Hennes The user has asked that he dont need any of the mail . I can delete . Since he wants the website but i am not sure how can i delete the acoount emails :( Please help – Yogus – 2013-08-14T07:16:00.127

@Hennes I can see mail/website.com/emailaccount/new . it has all those emails. Can I delete from here ? – Yogus – 2013-08-14T07:51:35.603

1>

  • Please add that information to the original post using the [edit] link below the post. That prevents the need for long discussions in comments. (The goal of the S.E. sites is to get reasonable generic answers which can help other people when they look for solutions and long, specif chats in comments do not serve that goal). 2) Probaly: yes. Try moving that file first (e.g. cd mail/website.com/emailaccount and then mv new new.backup. Then let the user check if the mailbox is empty. 3) I am deleting my comments. Can you do the same and add the information to the OP (original post) ?
  • < – Hennes – 2013-08-14T08:11:29.200

    1Yes, generally deleting something like mail/website.com/emailaccount/new will delete the emails. As the exact layout can vary from server to server, you might want to check the dates on the files, but it is entirely likely. – davidgo – 2013-08-14T08:37:10.427

    No answers