Debugging OS X Mail.app

Below are some commands to capture Mail.app sessions.

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

Alternately, launch Mail.app in debug mode and send errors to a log file:

/Applications/Mail.app/Contents/MacOS/Mail -LogSocketErrors YES -LogActivityOnHost your.mail.server -LogActivityOnPort 143 &> ~/Desktop/ConnectionLog.txt
Sources 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

Comments:

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 09, 2007 at 11:25 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

I currently live in San Francisco Bay Area. For the past seven years, I have been designing and building messaging solutions for Sun.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today