Hari's CornerHumour, comics, tech, law, software, reviews, essays, articles and HOWTOs intermingled with random philosophy now and then
How to re-create your Claws Mail contact list and inbox
Tutorials and HOWTOs by
Posted on Sat, Jun 22, 2013 at 20:21 IST (last updated: Sat, Jun 22, 2013 @ 20:22 IST)
Recently, for some reason, Claws Mail, which I use as my mail client, suddenly stopped recognizing one of my mail boxes and my contact list was empty. However, a closer investigation showed that the mail was still on the hard disk and so were the contacts. Here's a quick way to recreate your Claws Mail contacts and mail box if they suddenly disappear from the Claws Mail interface for some reason.
Recreating your e-mail contacts list
For some reason your contacts index might be corrupted. In that case, delete the file ~/.claws-mail/addrbook/addrbook--index.xml and restart Claws Mail. Your address book will still be empty, and a new addrbook--index.xml would be created. The file will look like this:
<?xml version="1.0" encoding="UTF-8" ?> <addressbook> <book_list> </book_list> <vcard_list> </vcard_list> <jpilot_list> </jpilot_list> <ldap_list> </ldap_list> </addressbook>
Check for files named addrbook-000001.xml, addrbook-000002.xml etc. in the same folder. If they exist and they contain your existing addresses, add them to the list of books manually to addrbook--index.xml using a text editor. For example:
<?xml version="1.0" encoding="UTF-8" ?> <addressbook> <book_list> <book name="Common addresses" file="addrbook-000001.xml" /> <book name="family" file="addrbook-000003.xml" /> <book name="friends" file="addrbook-000004.xml" /> <book name="work" file="addrbook-000005.xml" /> <book name="business" file="addrbook-000006.xml" /> <book name="misc" file="addrbook-000008.xml" /> </book_list> <vcard_list> </vcard_list> <jpilot_list> </jpilot_list> <ldap_list> </ldap_list> </addressbook>
Now your existing e-mail contacts should show up on Claws Mail Address Book.
Recreating Inboxes from Mail Folder
This one is simple. Fire up Claws Mail and choose File->Add Mailbox->MH. You should get this window.
Choose the folder name in your Home folder. For example, if you mail is in ~/Mail/mye-mail type Mail/mye-mail. If it is a MH folder, it should re-create the mail folder inside Claws.
Hopefully this will be useful to people who had experienced the same issues.