November 6, 2007

Zimbra + Mac OS X Leopard + Mail.app = WOE

It seems that Zimbra and Mail version 3.0 (shipping with OS X 10.5, Leopard) are incompatible.

I'm able to download, read, move and delete mail messages via an IMAP connection, but Zimbra considers all these messages to be unread and keeps the original untouched in the Inbox. This means that all the messages appear new and are downloaded again the next time Mail sees them - which is every time it checks for new mail.

Combine that with client-side mail filtering rules, and the net result is you end up with folders containing thousands of duplicate messages. This is especially exciting for busy mailing list subscriptions, as I'm sure you can imagine :-(

Why does this suck so much? Simple: IMAP is supposed to be a standard, so if it's not working between Zimbra and Mail it means that either Zimbra or Apple have not correctly implemented the standard (or possibly both of them). Given that Mail is working just fine with three other servers, I currently suspect Zimbra are the culprits. Bad implementations of standards annoys me.

The Zimbra website doesn't offer much help - apparently the Zimbra server doesn't support 10.5, but there's nothing else showing up there or in a Google search for zimbra problems.

Anyway, the net result: please consider my work email address "offline" for the time being, as I'm restricted to using Zimbra's web client.

The lengthy "I upgraded to Leopard and all I got was this lousy t-shirt" posts and the "yes, I know I was quiet for over a month but..." posts are suspended while I try and resolve this issue.

Technorati Tags: , , , , , ,

Posted by savs at November 6, 2007 5:48 PM
Comments

I am running 10.5 and Zimbra 4.5 and it is working perfectly on both mail.app and also my iPhone (via imap).

Could it be a file permissions problem or a corrupt mail file?

Posted by: BillyBP at November 6, 2007 7:24 PM

The above bug is regarding 10.5 server rather than the client environment - is your issue client or server side?

Posted by: BillyBP at November 6, 2007 7:26 PM

The issue is client-side; yes, the bug is regarding installing the server on Leopard, so not relevant, but the only thing I could find.

Could be a corrupt mail file, but I've tried deleting and recreating my account locally, and tried with a clean test zimbra account as well.

Posted by: Andrew Savory at November 6, 2007 8:08 PM

Hello,
This is John Holder from Zimbra. I wanted to drop you a line and ask if I could offer any assistance.

I am running leopard and apple mail via IMAP and don't seem to have an issue, however, I am running 5.0.

Are you running 5.0 Beta, or 4.5?

Also, feel free to shoot me an e-mail or drop by the forums.

john

Posted by: John Holder at November 6, 2007 8:17 PM

Hmm, this seems to be relevant: http://www.macintouch.com/readerreports/mail_app/topic3550.html

Posted by: Andrew Savory at November 6, 2007 8:22 PM

If it makes you feel any better Mail.app crashes if you make it work too hard with my UW-IMAP server. Fortunately I was already in the process of moving away from that server.

Posted by: Adrian Sutton at November 6, 2007 9:18 PM

Hi John,

I'm using (I believe) 4.5; it's good to know that Mail is behaving against your server. Sadly, I don't think I'll have the time to upgrade any time soon :-(

If anyone can suggest a bulletproof way of tracking down the cause, I'm open to suggestions ...


Posted by: Andrew Savory at November 6, 2007 10:00 PM

Hi there.

Create a new user, and try its Mail.app against your server. If it does not have the same problem, you have a corrupt preferences file or other mail.app file. If it has the same problem, you know at least it's not your local installation that's the problem.

You can add a new user, in case you don't already know, by going to your system preferences, from your blue Apple in the upper left hand corner of your screen. Choose Accounts, authenticate if you have to, and add a new account. Logout and login as the new account. Launch mail and configure it to hit your server...

If you need more help trouble-shooting, give us a call, or email me directly. Our entire Zimbra hosting help desk is composed of apple certified professionals (we also do Windows). Best.

01.com

Posted by: Gray Rothkopf at November 7, 2007 1:27 AM

I am having EXACTLY the same issue. The INBOX stays full. Mail.app evaluates everything in the INBOX each time you start. Worse still, sometimes Mail.app thinks that they are new, and my inbox all of a sudden ends up with a few hundred new emails.

My scenario is exactly as above - the message gets COPIED to the new folder, but left in the INBOX ! This is a disaster for me. Other than downgrading back to 10.4 I am not sure what to do.

Scott

Posted by: Scott Penrose at November 7, 2007 2:08 AM

Well, not sure about bullet proof, but here's some things to check out.

Any type of errors in /opt/zimbra/log/mailbox.log? Any other messages?

What about thunderbird?

A good way to check the zimbra version is to open the zimbra assistant using the ~ key while in the mail area. Then type .version and it should tell you.

Best,
john

Posted by: John Holder at November 7, 2007 5:24 AM

Previously I tried creating a new Zimbra user, but that user exhibited the same symptoms.

I've now created a new user on the Mac and pointed it at the new user in Zimbra (just to be sure my mailbox is out of the loop), and it exhibits the same symptoms. I thought it might be due to untrusted certificates on our server, but telling Mail to always trust the server didn't help, either.

Regarding the ~ key in the mail area ... in Firefox on Mac this does nothing for me, I suspect we did not enable the Zimbra Assistant. However navigating to 'version' in the Help text shows me:

version
Last updated 9/21/2006
ZCS 4.0.2
Copyright Zimbra, Inc.

Looking at the logs: I don't have a mailbox.log (old version?) but zimbra.log shows me errors, but they went away after I forced Mail to accept the certificate:

2007-11-07 06:39:53,156 INFO [ImapSSLServer-1453] [] imap - [this.is.my.ip] connected
2007-11-07 06:39:53,223 INFO [ImapSSLServer-1453] [] ProtocolHandler - Exception occurred while handling connection
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:742)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:622)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.zimbra.cs.imap.ImapHandler.sendLine(ImapHandler.java:2049)
at com.zimbra.cs.imap.ImapHandler.sendResponse(ImapHandler.java:2039)
at com.zimbra.cs.imap.ImapHandler.sendUntagged(ImapHandler.java:2028)
at com.zimbra.cs.imap.ImapHandler.setupConnection(ImapHandler.java:168)
at com.zimbra.cs.tcpserver.ProtocolHandler.run(ProtocolHandler.java:196)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723)
... 12 more

I also see it doing what I assume is moving messages:

2007-11-07 06:41:43,280 INFO [ImapSSLServer-1486] [ip=this.is.my.ip;name=foo.bar@foo.bar;] FileBlobStore - Linked id=280 mbox=84 oldpath=/opt/zimbra/sto
re/0/84/msg/0/276-11.msg newpath=/opt/zimbra/store/0/84/msg/0/280-12.msg
2007-11-07 06:41:43,281 INFO [ImapSSLServer-1486] [ip=this.is.my.ip;name=foo.bar@foo.bar;] FileBlobStore - Linked id=281 mbox=84 oldpath=/opt/zimbra/sto
re/0/84/msg/0/277-11.msg newpath=/opt/zimbra/store/0/84/msg/0/281-12.msg

... so, no obvious culprits :-(

I'll give Thunderbird a try this evening.

Posted by: Andrew Savory at November 7, 2007 6:51 AM

Andrew,

It's a server-side issue alright...

You're running 4.0!

Time to upgrade your Zimbra server.

Posted by: Gray Rothkopf at November 8, 2007 4:58 AM


We also are experiencing this problem across our zimbra install.

It seems to be only affecting filtered IMAP boxes where the filters are used on Mail.app.

We seem to have fixed this by mirroring the same filters inside of the zimbra account.

The steps I took were:

Disable all "store mail on the server" in Mail.app (mailbox behaviours)

Log in to Zimbra via web

Mark all messages as Read (important)
Recreate filters in the settings section.
I left the filters in Mail.app as well.

Now I don't know exactly which step fixed the issue but currently the net result is a properly behaving inbox. Another user was having the same issue and it worked for him as well.

My guess is that it has something to do with saving back to the IMAP folder as one sure way to cause a loop was drafts being written to the Zimbra server and then being downloaded which then wrote it back to the server, and so on.

The 10.5.1 Developer release makes mention of Mail Sync fixes so perhaps they discovered something there as well.

Posted by: Ben at November 8, 2007 8:30 PM

I have installed Leopard on my G5 1.9 Ghz imac, and now im experiencing alot of crashing... for instance, Mail application works fine, except when i try to print... CRASH. Same goes for Safari... work perfectly till i need to print out of it. also quark 6.5 crashes when i print, but quark 7 works perfectly! Illustrator (CS2) works perfect too. anyone else have this problem?

Posted by: mike at November 11, 2007 1:57 PM