Re: delete all email on a cyrus account

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
To: plug-discuss
Subject: Re: delete all email on a cyrus account
On Thu, 2005-04-07 at 09:35 -0700, Jim B wrote:
> I am using mozilla thunderbird on an account to check cyrus imap email
> and the account has over 40,000 email messages and thunderbird just
> locks up.

----
are you sure that it is locked up and not just taking a LOOONG time to
cache locally?
----
>
> How can I from the cyrus server just delete all email for that user?

----
To delete the account...
su - cyrus - c '/usr/lib/cyrus-imapd/cyradm localhost'
sam user.$USER_NAME cyrus lwrspcda
dm user.$USER_NAME
# substitute for cyrus, admin name in /etc/imapd.conf if you use a
different account for cyrus admin
# substitute different path for cyradm if yours is on a different path
# substitute user account for $USER_NAME

to delete the mail for that account, you could simply cd to to the mail
spool folder for that user...
cd /var/spool/imap/c/user/craig
rm -fr 1* 2* 3* 4* 5* 6* 7* 8* 9*
su - cyrus -c '/usr/lib/cyrus-imapd/reconstruct -r user.$USER_NAME'
---
>
> How can I tell the last time a user has logged in to check their email?

---
that's trickier...

for IMAP logins, you could probably get it from the date of 'seen' for
that user...

ls -l /var/lib/imap/user/c/craig.seen

but generally...

grep craig /var/log/maillog | grep login
grep craig /var/log/maillog.1 | grep login
grep craig /var/log/maillog.2 | grep login
grep craig /var/log/maillog.3 | grep login

would only go back 4 weeks

Craig

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss