On Tue, Jan 04, 2011 at 11:33:25AM -0500, Wietse Venema wrote: > > > Thank you. Is it possible to let this new setting contain something that > > > contains the client IP and/or something so we could identify it with a > > > script? > > > > Identify what with a script? > > > >[talk about stuff in logfiles] > > I'm just guessing, but I suspect that this is about making trouble > shooting easier, like putting some unique "trouble ticket" like > string in the 4XX or 5XX response that is easily located in the > logfile, so they can quickly locate the entire session in the log. > > smtpd_reject_contact_information = > For assistance, call 800-555-0101 with ticket $instance > > (where instance is the SMTP server PID and a sequence number, it's > the same attribute used in the SMTP policy server protocol). > > This is not as simple as it sounds (apart from the need to provide > the $name expansion module). > > Postfix currently does NOT log the contact footer to the maillog > file. There are tons of places in Postfix that reject a command > (e.g., bad syntax, or some requested feature not available) without > logging that the command was rejected. That would just make it too > easy for the bad guys to flood the maillog file with garbage. > > I could change postfix to ALWAYS log the contact footer to the > maillog fil3, but then you'd get lots of contact footers in the > maillog without any indication of why they were logged.
I don't think that the 50X or other unlogged error responses should start logging "disembodied" contact footers. If the contact footer is to log some unique identifier, then just that identifier could perhaps be added as a standard element of the log_whatsup() message... May have to initialize the instance id on entry to mail_cmd() rather than when it is (about to be) accepted. The smtpd_chat_reply() routine would then append the same instance id to the contact footer. -- Viktor.