Connection dropped by IMAP server

Hello Everyone, I need some help!

We have an Xserve G5 running 10.4.2 Server as our mail server. On-campus, people use Entourage to get their mail; off-campus they use Squirrelmail.

Here's the problem: Now and then a user will not be able to use Entourage to connect to their email account. Squirrelmail also doesn't work and when they try to login in SM, they get the following error: "ERROR: Connection dropped by IMAP server."

I used 'ps -ax' to view all processes on the mail server. There are a bunch (like 30) lines that say 'imapd: localhost [::1]' with no username afterwards. Also, in Server Admin's Mail Service window, there are a bunch of lines (about 30) in the Connections pane that have no username and the address is localhost. My guess is these are Squirrelmail sessions that didn't completely close because the user didn't click Sign Out or something. Just a guess. I don't know. I also don't know if this is related to my problem, or another issue going on at the same time.

Anyway. So, let's say johndoe gets the "dropped by IMAP server" error. There is a line in 'ps -ax' that says 'imapd: localhost [::1] johndoe user.johndoe' and for the life of me, I can't kill the process. I can kill everything else.

So I stopped the Mail Service via Server Admin and refreshed the Connections pane. Everyone disappears except johndoe. 'ps -ax' shows all other connections are gone except johndoe. Start Mail Service, johndoe still gets "dropped by IMAP server" error when trying to login.

So I tried to restart the server via Apple menu, Restart. Server hangs after dock and desktop items disappear. Just shows background...endlessly. Have to hold down Xserve power button for 5 seconds. Wait a few seconds, turn it back on, everything boots up fine. johndoe can now log in.

Seems trivial, eh? Well, I've had this happen to two other users in the last 2 months. If the pattern holds, johndoe's account is likely to do this again a few times in the next week. I'll have no idea why and no way to fix it except restart the entire server. And I think that's awful that I can't resolve this issue without cutting off ALL email access to resolve one account. But anyway. Plus, johndoe will not receive any email while this is happening. Messages to him get put in La La Land. I can't find them to deliver into his mailbox once he can log in again. Grrrr. I'm guessing they're just lost forever.

Does anyone have any ideas? Have you seen that SquirrelMail error before? Does anyone know which log files I should start monitoring to maybe find more answers??? (Please be specific: for example, tell me the full location.)

Thanks for your help!

Posted on Sep 15, 2005 5:06 PM

Reply
37 replies

Apr 2, 2006 12:48 PM in response to Garrettri

Yes, my server is on a NATed LAN. NAT and firewall are provided by another machine. The DNS service is not public, but is available to the local subnet.

The FQN of my computer is mycomputer.mydomain.com. The public domain mydomain.com is represented as mydomain.com in the mail server settings in Server Admin, where the hostname is mycomputer. Under general setup in Server Admin, the computer name is mycomputer and the local hostname is mycomputer. The server is Kerberized. My virtually hosted second domain is setup under mail:advanced:hosting as mydomain2.com.

Apr 21, 2006 4:47 PM in response to Pejvan

I have started to have this problem recently also with regular imap accounts that also access via squirrelmail.

I just put in the "fixes" offered in a couple other areas related to this.
http://discussions.apple.com/thread.jspa?threadID=131463&tstart=0
and
http://discussions.apple.com/thread.jspa?threadID=279943&tstart=0

but the squirrel mail connection is still getting "ERROR: Connection dropped by IMAP server." in the main pane.

I am running a dual processor server and since this problem began I have upgraded to 10.4.6 (server), rebuilt the email accounts, and database (both using the apple tool in server admin) and the above "fixes"

It is still stuck. help please. and thanks.

Apr 21, 2006 6:38 PM in response to Stephen Strand

Well, mailbfr corrected my last problem. (which appears to get back to the cyrus rebuild utilities) I am not sure why apple's rebuild command does not do as thorough a job as the underlying cyrus commands. why doesnt it just call them like mailbfr does?

anyway. all better for now (other than that all the email is now "unread").

I hope that my process can help someone... thanks for all the little tidbits of info to eveyone that has posted in the mail servers forum.

Jun 2, 2006 2:38 PM in response to Patrick Young2

It's me again. Our server had one brief relapse of my original problem ("Connection dropped by IMAP server"). I was out of town at the time and trying to explain to my less-than command-line-savvy boss how to dump the log files wasn't worth my time. She just held the power button for 5 seconds to turn off the server, then turned it back on.

This [big] problem happens so infrequently and I haven't found a way to induce it. So I can't scientifically debug it. Grrrr. I have the number of allowed connectioins set to 10 times the number of email users. This seems to help, almost like knocking out the smaller possible causes. But the problem has been back. I'm running 10.4.6 now with all relevant udpdates (iPod updates, etc. ignored).

One tip I have: it seems that the problem always happens at an inopportune time, like when I'm at home. It used to be that trying to remotely restart the server would make it hang as it tried to clean up processes. I found a way to make it reboot in a "dirty" fashion that bypasses all that. SSH into your server and issue this command as root or sudo: shutdown -n now. This has worked every time for me! The normal shutdown -r now will hang the poor server until I get back to work the next day. If you do issue shutdown -n now I recommend doing a regular, clean restart once the server reboots. I don't have any proof that it's necessary, just seems like a cleanup is in order. Also, if you already initiated a regular shutdown -r now or Restart from the GUI, you won't be able to SSH back in to issue shutdown -n now. So do a quick checklist on the status of the server before you try restarting it. Then you'll know which reboot command you'll need. Hope this saves some time for you too. It doesn't solve the original problem of "Connection dropped by IMAP server" but shaves some time off your down time if you're off-site.

Some people mentioned Retrospect as a possible cause. I'm not using Retrospect or anything fancy. Just a shell script that shuts down services, dittos and tars everything in a nice bundle, then starts up services.



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Connection dropped by IMAP server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.