Viktor Dukhovni via Postfix-users: > It is perhaps reasonable as a feature request to ask for the > "sasl_username" also be logged when rejecting SMTP commands from > authenticated users. For example, with the below patch, you'd get: > > Oct 23 14:49:05 amnesiac postfix/submission/smtpd[1071938]: NOQUEUE: > reject: RCPT from ...: 550 5.1.1 <postfix-us...@dukhovni.org>: > Recipient address rejected: Surely you jest; > from=<presid...@whitehouse.gov> to=<postfix-us...@dukhovni.org> > proto=ESMTP > helo=<smtpclient.apple> sasl_method=GSSAPI sasl_username=viktor > Oct 23 14:49:05 amnesiac postfix/submission/smtpd[1071938]: > disconnect from ... ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 quit=1 > commands=6/7
Good idea. I have adopted the patch. Wietse > --- a/src/smtpd/smtpd_check.c > +++ b/src/smtpd/smtpd_check.c > @@ -1016,6 +1016,14 @@ void log_whatsup(SMTPD_STATE *state, const char > *whatsup, > vstring_sprintf_append(buf, " proto=%s", state->protocol); > if (state->helo_name) > vstring_sprintf_append(buf, " helo=<%s>", state->helo_name); > +#ifdef USE_SASL_AUTH > + if (state->sasl_method) > + vstring_sprintf_append(buf, " sasl_method=%s", state->sasl_method); > + if (state->sasl_username) > + vstring_sprintf_append(buf, " sasl_username=%s", state->sasl_username); > + if (state->sasl_sender) > + vstring_sprintf_append(buf, " sasl_sender=%s", state->sasl_sender); > +#endif > msg_info("%s", STR(buf)); > vstring_free(buf); > } > > -- > VIktor. > _______________________________________________ > Postfix-users mailing list -- postfix-users@postfix.org > To unsubscribe send an email to postfix-users-le...@postfix.org > _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org