Help - Search - Members - Calendar
Full Version: How to delete all email for a user?
The Planet Forums > Control Panels > Plesk
JustinCase
How can I delete all email through ssh on plesk7. I.e. I have a user user@domain.com and it has 1000 emails in the box, and I just want to delete all of them. Webmail will take way too long, so I want to issue commands in ssh to do this. Does anyone know how?
Ales
You are using redhat rpm install right? Ok, the mails are located in /var/qmail/mailnames/domain.com/user/Maildir/cur and ../new

You can just delete all that you don't need any longer...

Heh, considering the date of your post, you probably used the webmail anyway icon_razz.gif I don't visit these forums so much anymore...
JustinCase
I can see these email forums, are much too dead. I am not helping either. haha Let me post my solution:

I did this to delete:

logon ssh root/su -
run following:
mkdir -p /root/deletedmail/new
mkdir -p /root/deletedmail/cur

mv /var/qmail/mailnames/domain.com/user/Maildir/new/* /root/deletedmail/new
mv /var/qmail/mailnames/domain.com/user/Maildir/cur/* /root/deletedmail/cur

next you will need to recreate both the new and cur directories, chown/chmod if necessary.

Finished.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.