Debugging OS X Mail.app
Below are some commands to capture Mail.app sessions.Alternately, launch Mail.app in debug mode and send errors to a log file:In Jaguar the session is recorded in /var/tmp/console.log
In Panther the session is recorded in /Library/Logs/Console/<username>/console.log
In Tiger the session is recorded in /Library/Logs/Console/<username>/console.log/usr/bin/defaults write com.apple.mail LogActivityOnPort 25
/usr/bin/defaults write com.apple.mail LogActivityOnPort 143
/usr/bin/defaults write com.apple.mail LogActivityOnPort "25,143"And to disable the logging use this command:
/usr/bin/defaults remove com.apple.mail LogActivityOnPort
/Applications/Mail.app/Contents/MacOS/Mail -LogSocketErrors YES -LogActivityOnHost your.mail.server -LogActivityOnPort 143 &> ~/Desktop/ConnectionLog.txtSources http://lists.balius.com/pipermail/mac-users/2005-December/000043.html and
http://developer.apple.com/bugreporter/bugbestpractices.html#Mail
[UPDATE Nov 21, 2007] More debugging options listed on: http://www.macosxhints.com/article.php?story=2004101603285984
Great help, you may want to not that you can use different ports, such as IMAP port:
/Applications/Mail.app/Contents/MacOS/Mail -LogSocketErrors YES -LogActivityOnHost gmail.com -LogActivityOnPort 993,143 &> ~/Desktop/ConnectionLog.txt
Posted by bart on November 10, 2007 at 07:25 AM PST #