Wednesday, March 15, 2006

OS X: Logging Mail.app's Activities on a Port

Another one for the command-line geeks. If you want to log what Mail.app is doing on a specific port, launch it from a terminal like so:

/Applications/Mail.app/Contents/MacOS/Mail -LogActivityOnPort 25

Mail.app will start as usual, but all activities regarding port 25 (smtp) will be logged into the terminal window. Another port of interest would be 110 (pop).

I found this in one of my one-liner-docs. As I wrote in the "Unix/Linux Survival Guide" (link on the right), always keep a text file with one-liners you stumble over handy. I forgot to take note where I found this hint, though. Whoever wrote about this somewhere in the Internet, thanks a million.