[pfx] Re: SASL username logging for failed authentications

2023-10-06 Thread Viktor Dukhovni via Postfix-users
On Fri, Oct 06, 2023 at 06:50:38PM -0400, Wietse Venema via Postfix-users wrote: > +} else { > + server->username = mystrdup(serverout); > + printable(server->username, '?'); I might note that when UTF8 is enabled, this does correctly leaves valid UTF8 characters undisturbed.

[pfx] Re: SASL username logging for failed authentications

2023-10-06 Thread Wietse Venema via Postfix-users
Wietse Venema via Postfix-users: > I think I can take it from here. Wietse 20231006 Clenaup: attempt to log the SASL username after authentication failure. This appends ", sasl_username=xxx" to SASL authentication failure logging. Based on c

[pfx] Re: SASL username logging for failed authentications

2023-10-06 Thread Wietse Venema via Postfix-users
Jozsef Kadlecsik via Postfix-users: > +sasl_username = xsasl_server_get_username(state->sasl_server); > +if (sasl_username != 0) { > + state->sasl_username = mystrdup(sasl_username); > + printable(state->sasl_username, '?'); 1) There is no corresponding myfree() call. 2) There

[pfx] Re: SASL username logging for failed authentications

2023-10-06 Thread Wietse Venema via Postfix-users
Jozsef Kadlecsik: > If I increase the log_level to 4 in the sasl config for smtpd and add -v > to smtpd in master.cf, then the username is reported in the log: Of course the login name is sent via the AUTH command, and it will show up in the raw protocol logging. Your example is for the LOGIN

[pfx] Re: SASL username logging for failed authentications

2023-10-06 Thread Jozsef Kadlecsik via Postfix-users
On Fri, 6 Oct 2023, Jozsef Kadlecsik via Postfix-users wrote: > However it's a debug mode, cannot be used in production. It is clear that > SASL protocol is not implemented and thus the messages have no meaning, > just reported. However, it seems the data is there and available. > > Would you

[pfx] Re: SASL username logging for failed authentications

2023-10-06 Thread Jozsef Kadlecsik via Postfix-users
Hi Wietse, On Fri, 6 Oct 2023, Wietse Venema via Postfix-users wrote: > Jozsef Kadlecsik via Postfix-users: > > Hi, > > > > Is there a way to get the SASL username logged for the failed > > authentications together with the client IP data? Postfix can log half of > > the information the

[pfx] Re: Can postfix/spamassassin save blocked messages ?

2023-10-06 Thread Bill Cole via Postfix-users
On 2023-10-06 at 08:11:13 UTC-0400 (Fri, 6 Oct 2023 12:11:13 +) White, Daniel E. (GSFC-770.0)[AEGIS] via Postfix-users is rumored to have said: We have mail coming from one of our servers that gets a spam score of 8 and gets blocked. Is it possible to tweak the configuration of postfix

[pfx] Can postfix/spamassassin save blocked messages ?

2023-10-06 Thread White, Daniel E. (GSFC-770.0)[AEGIS] via Postfix-users
We have mail coming from one of our servers that gets a spam score of 8 and gets blocked. Is it possible to tweak the configuration of postfix and/or spamassassin to save the blocked messages for debugging/troubleshooting purpuses ? Thanks. ___

[pfx] Re: SASL username logging for failed authentications

2023-10-06 Thread Wietse Venema via Postfix-users
Jozsef Kadlecsik via Postfix-users: > Hi, > > Is there a way to get the SASL username logged for the failed > authentications together with the client IP data? Postfix can log half of > the information the connecting client IP address, while Cyrus saslauthd > the second one the username.

[pfx] SASL username logging for failed authentications

2023-10-06 Thread Jozsef Kadlecsik via Postfix-users
Hi, Is there a way to get the SASL username logged for the failed authentications together with the client IP data? Postfix can log half of the information the connecting client IP address, while Cyrus saslauthd the second one the username. However there's no clear way (except the timestamp)