How can I monitor an IMAP transaction between Mail.app and GMail's IMAP server?

1

I've got a client who has experienced this intermittent symptom, and I'm looking for the cause:

Using Mail.app with GMail (enterprise edition), he presents Mail.app to me when it has an indeterminate progress indicator (spinning circle) next to the 'Sent' box. During this time, he can compose new messages and ask mail.app to send them, but they never leave his machine. I use Window > Connection Doctor > Show Detail to see IMAP commands and data flying by, but I can only see a few lines at a time, and have no way to scroll back to decipher what's going on.

The connection from Mail.app to GMail is encrypted, so I didn't think a packet capture would do what I wanted.

Is there a logging option that I can enable?


As an aside, I can clear this issue by deleting the (hidden) directory at ~/Library/Mail/IMAP-user@gmail.com/.OfflineCache/

Dennis Wurster

Posted 2010-08-11T15:12:25.553

Reputation: 285

Answers

1

You can try:

/Applications/Mail.app/Contents/MacOS/Mail -LogSocketErrors YES -LogActivityOnHost your.mail.server -LogActivityOnPort 143 &>~/Desktop/ConnectionLog.txt

or if you have 10.5 or later

/Applications/Mail.app/Contents/MacOS/Mail -LogActivitiyOnHost your.mail.server -LogMaximumBytes 200 -LogIMAPErrors YES &>•/Desktop/ConnectionLog.txt

and in another terminal window

tail -f ~/Desktop/ConnectionLog.txt

Apple Developer Mail Documentation

I also find that sometimes Little Snitch can be helpful for these things

uncreative

Posted 2010-08-11T15:12:25.553

Reputation: 131