Can't find postfix log

Hello,

I’m trying to configure Fail2ban on my VPS and enabling postfix-sasl jail, but I’m having trouble locating the Postfix log file. From what I understand, it should be located under /var/log/ (specifically /var/log/mail.log), but I can’t find anything related to “mail” or “postfix” in that directory.

Could someone please guide me on what might be missing or how I can find the correct log file path?

Thank you for your help!

Best regards,

SYSTEM INFORMATION
OS type and version Debian Linux 12
Webmin version 2.202
Virtualmin version 7.20.2
Webserver version Nginx version 1.22.1
Related packages Postfix version 3.7.11

Newer systems log most things to the journal.

Use journalctl to view it or the System Log Viewer module in Webmin.

e.g.:

journalctl -fu postfix

To tail the journal for the unit postfix.

I can view the Postfix logs using the method you suggested, but I’m unsure how to leverage them to block spammers with the postfix-sasl jail in Fail2ban.

On another server running Debian 11, I have this jail enabled for similar websites, and it has successfully blocked thousands of login attempts. It’s been very effective in keeping spammers at bay, so I’d like to achieve the same result here.

Could you guide me on how to set it up correctly?

Thanks!

The fail2ban backend for this jail should presumably already be set to systemd, right? That should handle reading it from the journal.

That was what I was missing. Thank you very much for your help!