How to log actual SMTP Authentication module communication with server? We are using SMTP Authentication  module. Our SMTP provider claims we are whitelisted. Configuration works. When Drupal is supposed to send email, proper entry appears in Watchdog, claiming succesful sending.

Sadly, these days only 2 kinds of email ever arrive to our users: "Account disabled" and "Account deleted" notifications, and SMTP Authentication module test email. Password restore mails, email confirmation ones, user awaiting moderator's approval etc does not.

How can we log actual communication with SMTP server and have it stored for future reference? Now we don't know if we have to look for a bug in Drupal, or is it SMTP server's fault. With real data, we could tell for sure, and fix / have fixed the part that really needs it.

Enabling "debug" in SMTP Authentication is not practical - it debugs to screen, so it breaks AJAX calls and most of these emails are password recovery or new user ones, so they are triggered by anonymous - who obviously will not see debug data.
I guess a simple answer would be to change the SMTP module's debugging output to use the watchdog, in addition to/instead of to the screen. 

Unless the module offers a hook to do that you'll probably need to patch it temporarily, but if you need to debug on the live server you don't really have another option (not an easier one that I can think of, anyway). 

The usual advice would be "get it reproduced on dev, then relax devel permissions temporarily for anon users to test", but of course with emails, getting problems reproduced is often hit and miss between different servers.