Imap died!

Whitehill

Registered
Yesterday one of my clients slowed to a crawl and the activity monitor said Mail was the culprit. I shut down Mail and activity went to normal levels.

I returned to the issue early this morning. Restarting Mail on the client caused activity to go thru the roof. So I started looking at server logs. See below. Now what? Any advice?

/var/log/mailaccess.log:
Mar 16 05:14:47 server imap[273]: ERROR: invaldi date/time: 0 (year = 69)
...
Mar 17 06:37:07 server imap[19396]: ERROR: invaldi date/time: 0 (year = 69)
...

/var/log/system.log:
Mar 17 06:37:04 server imap[19396]: login: client [10.0.1.60] knownuser plaintext User logged in
Mar 17 06:37:07 server imap[19396]: ERROR: invaldi date/time: 0 (year = 69)
Mar 17 06:37:07 server master[54]: process 19396 exited, signaled to death by 6
Mar 17 06:37:07 server imap[19403]: login: client [10.0.1.60] knownuser plaintext User logged in
Mar 17 06:37:08 server imap[19404]: login: client [10.0.1.60] knownuser plaintext User logged in
Mar 17 06:37:08 server imap[19404]: ERROR: invaldi date/time: 0 (year = 69)
Mar 17 06:37:08 server master[54]: process 19404 exited, signaled to death by 6
Mar 17 06:41:10 server imap[19403]: IOERROR: user.knownuser zero index record 193/587
Mar 17 06:41:58 server imap[360]: IOERROR: user.knownuser zero index record 193/587
 
Whitehill said:
And when I log in on the server as that imap user, Mail runs fine - no unusual activity.

Check the amount of available disk space. My mail server crashed this week, because webperformance cache filled up my boot drive. Solve this by removing the log (which filled my 40g disk space in 1 day after a clean installation) and disable if (in web services under server admin) active.


Good luck, Kees
 
When you load the Mail client, open the Activity Window (Cmnd+Zero) and see what it's trying to do to cause so much noise.

If it's not doing something it's supposed to (like trying to send a very large file, etc) then click the stop sign to cancel it.
 
Nope. Plenty of space. On the client machine's console log, I found this:

2006-03-16 15:58:07.561 Mail[282] no emlx file found to update for message <LibraryMessage: 0x5cd0df0, library id: 174817>
2006-03-16 15:58:08.483 Mail[282] no emlx file found to update for message <LibraryMessage: 0x5cd0df0, library id: 174820>
2006-03-16 15:58:08.868 Mail[282] no emlx file found to update for message <LibraryMessage: 0x5cd0df0, library id: 174821>
2006-03-16 15:58:09.727 Mail[282] no emlx file found to update for message <LibraryMessage: 0x5c97c20, library id: 174811>
2006-03-17 05:36:55.722 Mail[917] Unread count went negative for mailbox Junk
2006-03-17 06:37:07.296 Mail[917] couldn't load body for <IMAPMessageWithCache: 0x58dfab0, uid: 9383>, aborting
 
ra3ndy said:
If it's not doing something it's supposed to (like trying to send a very large file, etc) then click the stop sign to cancel it.
Wow! That's a handy little window. This shows when activity ramps up:

[INBOX - Server] Opening mailbox...
Fetching headers...

When I click the stop sign, activity vanishes. I click on any other folder, no problem. When I click on InBox again, up it goes.
 
It sounds as if there's quite a lot of mail in the user's inbox. The activity is normal procedure for an IMAP account. When you access the Inbox, it tries to retrieve headers for all the messages there.

Possible workaround: if the email server allows webmail access, then go into it that way, and find out how many messages are waiting in the Inbox.

If you allow Mail to run with the "Fetching headers" command, eventually it will show you how many headers there are to retrieve, and how many it's retrieved. If it doesn't display this after 5-10 minutes, you may just want to reset Mail to default and set up the account once over.

To do that:
trash com.apple.mail.plist in the Users/[user name]/Library/Preferences folder.

in in the Users/[user name]/Library/Mail folder, trash the following files and folders:

the mail account folder (named something like IMAP-user@company.com@mail.company.com)
The Mailboxes folder
The Mailboxes.mbox folder
OpenedAttachments.plist
MessageRules.plist


It sounds drastic, but is often the solution that works for these seemingly unexplainable errors. Good luck!
 
ra3ndy said:
It sounds as if there's quite a lot of mail in the user's inbox. The activity is normal procedure for an IMAP account. When you access the Inbox, it tries to retrieve headers for all the messages there.
When the problem started, there were fewer than 200 messages in the inbox. Now there are zero, yet the problem remains. I used Mail on the server and moved the contents of inbox off to another folder. Before doing that, I opened the activity window and observed the same activity as on the client. It just doesn't consume the resources of a Quad G5.

I'll play with it more over the weekend. Maybe I will have to start over, but I sure would like to know what started it.
 
Whitehill said:
I'll play with it more over the weekend. Maybe I will have to start over, but I sure would like to know what started it.

Have you checked the error logs on the server ? Also try reconstruct on the server for the appropriate mailbox in server admin.


Good luck, Kees
 
Kees Buijs said:
Also try reconstruct on the server for the appropriate mailbox in server admin.
The problem has gone away after the following steps:

# On client, disable imap account.
# On server ...
# Stop mail service
sudo -s
cd /var/imap
cp mailboxes.db mailboxes.db-backup
sudo -u cyrusimap /bin/bash
# The following 3 lines may not be needed.
/usr/bin/cyrus/bin/ctl_mboxlist -d > /tmp/mboxlist.txt
rm mailboxes.db
cat /tmp/mboxlist.txt | /usr/bin/cyrus/bin/ctl_mboxlist -u
/usr/bin/cyrus/bin/reconstruct -r -f user
exit
exit
# Start mail service
# On client, enable imap account after opening activity window. In awe, watch all the activity!
 
Whitehill said:
2006-03-17 05:36:55.722 Mail[917] Unread count went negative for mailbox Junk
Any idea what that actually means? I often see that "for mailbox INBOX" when accessing my primary inbox.

Surprisingly enough, yours is the only reference to that message I could find when searching for it.
 
Back
Top