Logging of SMTP Sessions ======================== Normally, qmail-smtpd doesn't log anything. With SPAMCONTROL qmail-smtpd logs some accepted and some (important) rejected SMTP session attempts. Format: "Action::Type::Condition: Information" Here's the glue: Action Type Condition Explanation ----------------------------------------- Reject SMTP Toomany_Hops Message Hop count exceeded Reject SMTP Syntax_Error Malformed SMTP address (e.g. missing brackets) Reject DATA Invalid_Size DATA exceeds sizelimit Reject DATA Bad_MIME DATA includes BASE 64 MIME type listed in badmimetypes Reject DATA Bad_Loader DATA includes BASE64 loader type listed in badmimetypes Reject DATA Virs_Infected DATA includes virus infected message (QHPSI) Reject SNDR Bad_Helo SNDR's HELO is in the badhelo Reject SNDR DNSA_HELO SNDR's HELO has no DNS A RR Reject SNDR Invalid_Relay SNDR's tries relaying; but not allowd Reject SNDR Missing_TLS TLS/STARTTLS was required; but not satisfied by SNDR Accept SNDR Start_TLS TLS/STARTTLS successfully negotiated Accept SNDR Relay_Client SNDR was identfied as relay client Reject ORIG Bad_Mailfrom ORIG is in badmailfrom Reject ORIG DNSMX_MF Domain part of ORIG has no DNS MX RR Reject ORIG Failed_Auth ORIG tried SMTP Authentication; but failed Reject ORIG Require_Auth SMTP Authentication required; but not granted Reject ORIG Invalid_Sender ORIG not allowed to send Reject ORIG Missing_Auth SMTP Authentication required, but not granted Accept ORIG Valid_Auth ORIG was successful authenticated Accept ORIG Local_Sender ORIG was identified as local sender address Accept ORIG Relay_Mailfrom ORIG was accepted als Relaymailfrom Reject RCPT Bad_Rcptto RCPT is in badrcptto Reject RCPT Toomany_Rcptto Too many RCPTs Reject RCPT Failed_Rcptto RCPT could not acceptd as per recipients/cdb. Accept RCPT Recipients_Rcptto RCPT was accepted as per recipients/cdb. Accept RCPT Rcpthosts_Rcptto RCPT was accepted as per rcpthosts/morercpthosts SNDR (S) corresponds to the sending MTA. ORIG (F) is the "MAIL From: ". RCPT (T) is the "RCPT To: ". DATA is the Message. The Information is typically constructed from the SMTP envelope like: S:IP:FQDN P:Protocol H:Helo F:Mailfrom T:Rcptto This scheme is easy extendable to other successful/deferred SMTP sessions.