Fixing SmarterMail for Mail.app
Ever since our companies mailserver changed from Merak to SmarterMail I’ve been unable to access my emails with Mail.app, I’ve had to resort to Thunderbird. Don’t get me wrong the migration from Merak was a welcome one, I’d frequently get emails with no subject or sender while on that one.
But using Thunderbird really, really, really sucked. The UI on Mac is not pleasant, it doesn’t fit and its quite slow1. It also doesn’t integrate at all with the system Address Book.
Now though, I have found a solution.
- Create a new temporary account
- Through IMAP copy all of the email you want to keep to the temporary account
- Delete the original email account
- Re-create the original email account
- Add the new original account to Mail.app
- If this fails or hangs then you might need to recreate again. Or if you can talk IMAP then just make sure all the emails in the account are deleted.
- Copy all of the emails from the temporary account to the new original account.
As the emails are being copied back make sure Mail.app is open so it sees the emails coming back into the mailbox in chunks. I somehow think this is the key to it working, but at the same time the lone email I had to nuke from my IMAP INBOX via telnet didn’t give up much to . FETCH 1 full which might have been an issue for Mail.app as well.
Once that was done all was working happily as it should be.
1Negative perceptions may influence this impression.
IMAP through Telnet
If you need to nuke any mails from your INBOX over IMAP you can do it like this
$ telnet mail.example.com 143
* OK IMAP4rev1 SmarterMail
. LOGIN user@domain.com mypassword
. OK LOGIN completed
. SELECT INBOX
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 0] UIDs valid
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)]
. OK [READ-WRITE] SELECT completed
. FETCH 1 full
* 1 FETCH ()
. OK FETCH completed
. STORE 1 FLAGS \Deleted
* 1 FETCH (FLAGS (\Deleted))
. OK STORE completed
. EXPUNGE
* 1 EXPUNGE
. OK EXPUNGE completed
and now Mail should be happy with the state of the inbox.