Where is Postfix SASL smtpd.conf for enhanced logging to see username failures?

SYSTEM INFORMATION
OS type and version Ubuntu 22.04
Webmin version 2.111
Virtualmin version 7.10.0 Pro
Related packages Posfix

Good morning,

I need to turn on Postfix SASL enhanced login. I want to see the usernames when there is a failure. The reason is we have a server with 100+ domains and 1000+ users. Often we these failures when SMTP is misconfigured:

2024-05-03 15:06:01 server postfix/smtpd[816492]: connect from a-b-c-d.ip.airmobile.co.za[a.b.c.d6] 
2024-05-03 15:06:03 server postfix/smtpd[816492]: warning: a-b-c-d.ip.airmobile.co.za[a.b.c.d]: SASL PLAIN authentication failed: authentication failure 
2024-05-03 15:06:06 server postfix/smtpd[816492]: warning: a-b-c-d.ip.airmobile.co.za[a.b.c.d]: SASL LOGIN authentication failed: authentication failure 
2024-05-03 15:06:08 server postfix/smtpd[816492]: warning: a-b-c-d.ip.airmobile.co.za[a.b.c.d]: SASL PLAIN authentication failed: authentication failure 
2024-05-03 15:06:09 server postfix/smtpd[816492]: warning: a-b-c-d.ip.airmobile.co.za[a.b.c.d]: SASL LOGIN authentication failed: authentication failure 
2024-05-03 15:06:09 server postfix/smtpd[816492]: lost connection after AUTH from a-b-c-d.ip.airmobile.co.za[a.b.c.d]

According to this Stack post if I turn on Postfix SASL to verbose level 4 I might be able to get usernames:

  1. Try setting the logging level as log_level:4 in smtpd.conf ( might be /usr/lib/sasl2/smtpd.conf )

  2. In /etc/postfix/master.cf, add -v after a process like

smtp      inet  n       -       n       -       -       smtpd -v

Finding /etc/postfix/master.cf is easy, but where is smtpd.conf? I looked in /usr/lib/sasl2/ and there is no such file called smtpd.conf.

Incidentally we’re seeing this problem at lot more lately because the new version of Microsoft Outlook takes over IMAP and SMTP and proxies them via Microsoft’s servers. Sometimes this automated configuration gets the password wrong.

did you try the locate command
image

Thanks @stefan1959 ,

I guess you’re using a Red Hat derivative?

For noobs like me, on my Ubuntu-based system:

ls -lah /etc/sasl2/smtpd.conf
ls: cannot access '/etc/sasl2/smtpd.conf': No such file or directory

Then

locate smtpd.conf
Command 'locate' not found, but can be installed with:
apt install mlocate

Then

apt install mlocate 

Wait 5 minutes “Initializing mlocate database; this may take some time…”

Then:

locate smtpd.conf
/etc/postfix/sasl/smtpd.conf

This spews alot of extra stuff, can’t see a usernames though, turning it off :slight_smile:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.