Can the raw SMTP conversation be logged?

51 views
Skip to first unread message

Andy Haer

unread,
Feb 9, 2012, 4:23:55 PM2/9/12
to Railo
I've recently moved from ACF to Railo and I'm having trouble debuging
some email sending problems. Is there any way to replicate the
function of ACF mailsent.log file? The amount of info in mail.log at
info or debug level is of minimal help as you can't even identify
which email its talking about (ie no from, to, etc)

I was also wondering what it would take to actually log the transcript
of the actual conversation between railo and the SMTP server (minus
the message body)...

Thanks for your help

Leigh

unread,
Feb 9, 2012, 7:49:02 PM2/9/12
to ra...@googlegroups.com
Andy, I am a Railo novice myself. So I will leave the question of whether it is currently configurable (on a per mail basis) to a Railo sage ;) 

But I believe ACF just uses basic javamail logging, on a per mail basis. But you can also enable it server wide via a jvm flag: -Dmail.debug=true. The obvious downside being that enables logging for all mail - across the board. So it is okay for a dev server, but not production. As far as omitting the message body, I do not think that is possible even in ACF. IIRC because javamail debugging is all or nothing.
-Leigh

Bruce Kirkpatrick

unread,
Feb 9, 2012, 9:39:34 PM2/9/12
to Railo
Did you try disabling the spool on the cfmail tag? this usually will
tell you any 500 errors as an exception. If there is no exception,
then the remote server is choosing to ignore your email, delay it, or
spam it.

if some mail gets through, then maybe you could use/install some kind
of command line smtp testing tool on your server to see if that
generate the same failures when sending to the problematic email
address. Most likely the problem is a non existent user, full
mailbox, missing reverse dns record or a spam related deferral/
rejection.

Andy Haer

unread,
Feb 10, 2012, 8:01:12 AM2/10/12
to Railo
Why do you say that this is not okay for a production server?

What I'm really looking for is some sort of proof that the email made
it out of railo and "into the world" when someone calls and says "we
didn't get the email". ACF had the mailsent.log that could easily me
see what was sent. Setting the rail mail log level to "info" only
gives me the basic info. Ie .

"INFO","web-0","02/08/2012","12:35:45","mail","send mail"
"INFO","web-0","02/08/2012","12:37:32","mail","send mail"
"INFO","web-0","02/08/2012","12:37:33","mail","send mail"
"INFO","web-0","02/08/2012","12:55:46","mail","send mail"

I've written my own log with enough info to actually identify the
email (along with the time) but I don't feel comfortable that I can
expect that the time I write after I call CFMAIL (with spooling) is
the same as what Railo writes in the log. I.e. if it gets stuck in
the spool it seems reasonable to think that the time in the railo log
would be later.

Unfortunately I don't have the time to look through the railo source
to figure out what's going on or how to extend it myself as I am under
a deadline and don't know Java...



On Feb 9, 7:49 pm, Leigh <cfsearch...@yahoo.com> wrote:

Leigh

unread,
Feb 10, 2012, 9:36:20 AM2/10/12
to ra...@googlegroups.com
> Why do you say that this is not okay for a production server?

Just to exercise caution. It generates a ton of logging, including the content of all messages, until the flag is disabled. Not something you want to leave running on a production server that blasts out large quantities of email.
 

Andy Haer

unread,
Feb 10, 2012, 10:54:50 AM2/10/12
to Railo
Email is for registration confirmation so volume is not high. Will
keep an eye on the size though

Thank you very much!
Reply all
Reply to author
Forward
0 new messages