Can I see the SMTP session log when Mail.app connects to an SMPT server?

2

Problem: I've set up a mail server using SASL authentication, and have given Mail.app (on Mac Os 10.4) the login information it needs to connect. I wrote a test message for it to deliver to my server: the Activity window shows that it tries to deliver the message, but then it simply stops, with no indication of error, except that the test message is left in the Outbox.

How can I find out what went wrong? Is there some log file I don't know about?

Charles Stewart

Posted 2010-05-30T10:47:30.897

Reputation: 2 624

Answers

3

Your first step could be try the Connection Doctor (I think it's available in Tiger, I don't have a copy, so not 100% sure?), under Mail's Window menu. Click the Show Detail button then check again to see a log of connection attempts.

Unfortunately, all connections - IMAP, POP and SMTP are interspersed in one log. So it's not the best of logs, but will at least show you if Mail at least connected to the server successfully; it won't test sending mail though.

Also, this http://blogs.oracle.com/chienr/entry/debugging_os_x_mail_app might help for a bit more logging.

Steve Folly

Posted 2010-05-30T10:47:30.897

Reputation: 5 293

FWIW, the Connection Doctor is available in Tiger. It was also Window > Connection Doctor. It has no Detail button though. This is still a good first step. – Chris Johnsen – 2010-05-30T18:55:45.720

It says "Could not connect to this SMTP server" - which is information! Since I can connect by hand using openssl s_client, that tells me that Mail must be misconfigured. – Charles Stewart – 2010-05-31T10:28:32.500

3

Stop Mail, find the file /Library/Scripts/Mail Scripts/Turn on Logging.scpt and double-click it to open AppleScript Editor. Next, press Command-R to run it, and select what you want to capture. And then use Applications, Utilities, Console to see the output.

(When done, restart Mail to stop logging, as it will log a lot.)

(This works on 10.5 and 10.6; not sure about 10.4. If you cannot find the script, here is a copy.)

Arjan

Posted 2010-05-30T10:47:30.897

Reputation: 29 084

On Yosemite I get the error "Can’t make «class port» of «class dact» of item 1 of every «class mact» of application "Mail" into type string." from this script. – Douglas Held – 2015-05-21T16:29:09.103

The script is available under the same pathname in 10.4. – Chris Johnsen – 2010-05-30T18:57:45.470

Hmm. I get most of the SMTP session for another SMTP/SSL account, but the only feedback from trying to deliver to the SASL account is that it has loaded the keys from my .ssh account, followed immediately by "All identities removed". – Charles Stewart – 2010-05-31T10:28:50.083