On Mon, 11 Jan 2016, Sophie Loewenthal via Info-cyrus wrote:

Hi!

I have a broken mailbox that I would like to delete.

This is Cyrus v2.3.16 on CentOS 6.

I tried reconstructing the mailbox from scratch ( Because I suspect this was manually deleted from disc ).


mkdir imap-store/spool/imap/domain/example.com/user/kat^long
cd imap-store/spool/imap/domain/example.com/user/kat^long
chmod 755 .
chown cyrus:mail .
touch cyrus.header
chown cyrus:mail cyrus.header

log into cyradm:
localhost> lam user/kat.long
kat.l...@example.com lrswipkxtecda
localhost> reconstruct -r user/kae.long
reconstruct: Mailbox has an invalid format
localhost> dm user/kat.long
deletemailbox: Permission denied

Names and domain names replaced with false entries.

How could I remove this?

Here are my steps for recreating a mailbox (normally when I'm restoring a mailbox from backups):

1. Locate user's mail directory (/var/spool/cyrus/mail/prefix/user/username).
2. Change to that directory.
3. Make a RESTORE directory (mkdir RESTORE).
4. Fix ownership/perms (chown cyrus:mail RESTORE; chmod 700 RESTORE).
5. Change to the directory containing the mail folder the user wants restored.
6. Run 'recover', the Legato backup client.
7. 'changetime' to change the time to recover data from.
8. 'add filename' to add the files to restore.  To restore all the messages in 
the folder, use 'add *.'.
9. 'relocate RESTORE' to recover files into the RESTORE directory instead of 
the current directory.
10. 'recover' to recover the files.
11. 'quit' to quit out of the recover program.
12. Create a dummy cyrus.header file "(touch RESTORE/cyrus.header; chown 
cyrus:mail RESTORE/cyrus.header; chmod 600 RESTORE/cyrus.header).
13. Run "su cyrus -c '/usr/local/cyrus/bin/reconstruct -x -f user.username'".
14. Run "su cyrus -c '/usr/local/cyrus/bin/quota -f user.username'".

I think you're following the same basic steps, but I would try running reconstruct externally, not from cyradm. Don't forget the quota command either.

When you run reconstruct, check syslog for errors too.

        Andy
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Reply via email to