At some point I'll write a cogent, one per email summary log plugin, but in the mean time I'd like to run with little logging but still be able to debug the who/what/when/why and sometimes where issues:
Yeah, I was just noticing how odd it was that FROM was always logged but TO wasn't logged at all. I think this is the wrong way to go about it though; the log() function should be used for this instead, so that it would be possible to supress even this text. Using warn() means that there is no way to suppress it.
I think this is more appropriate
--- SMTP.pm.orig 2004-07-15 11:22:34.000000000 -0500
+++ SMTP.pm 2004-07-15 11:23:32.000000000 -0500
@@ -251,6 +251,7 @@ sub rcpt {my ($rcpt) = ($_[0] =~ m/to:(.*)/i)[0]; $rcpt = $_[1] unless $rcpt; + $self->log(LOGWARN, "$$ to email address : [$rcpt]"); $rcpt = (Mail::Address->parse($rcpt))[0];
return $self->respond(501, "could not parse recipient") unless $rcpt;
John
