Debian 12 and user log in question

Hi again

I have a question, I have noticed that under Virtualmin > domain name> edit users it used to give the last time they logged in, This no longer seems to be the case with Debian 12 we are testing, any help in fixing this ?

Thanks
Michael

According to the tooltip, “This field shows the last login times via IMAP, POP3 or SMTP detected by Virtualmin for this user.”

I confirm in my case the same phrase is displayed. I haven’t evaluated this issue, but you should use a MUA to authenticate using one of the 3 protocols. If it does not appear even after that, it means that Virtualmin uses a log file that does not exist.

1 Like

Howdi

Its seems to be an issue with Deb 12 and virtualmin as the others are all working.

Are Dovecot and Postfix logging to /var/log/mail.log or are they now logging to the journal exclusively?

/var/log/mail.log no longer exists, so I’m going with Journal only from here on.

Michael

That explains why it isn’t working. I’m pretty sure that info historically comes from the mail log. We’ll need to implement reading it from the journal instead, I guess.

@Jamie, are you aware of Debian 12 removing the mail.log?

Thanks Joe, there are a few changes in Deb 12 I’m finding.

Yikes, really? I didn’t know that mail logs had disappeared!

What command can be used to display the mail log on Debian 12?

journalctl, like everything else.

I guess it’d be -u postfix and -u dovecot, but maybe saslauthd would have the SMTP logins. I’d have to test to be sure, or get some feedback from users. @Shirehosting can you check those journal units to see where logins for SMTP/IMAP/POP3 show up, and what they look like?

You could tail each of those units in different sessions and then use your mail client to fetch and send mail, and post the related results.

Hi Joe

I’m crap at this new log system (logs seem to go missing after a few minutes ??), I can give you access to the server and you can look around to your hearts content, if that helps you ? there is even a test email account there that you can use.

Let me know if your good with that ? (there used to be a button that allowed you guys to log in … where has that gone ?)

Michael

Here is one of each

Aug 07 15:08:45 menai.shirehosting.com.au dovecot[13266]: imap-login: Login: user=test@abhcs.com.au, method=PLAIN, rip=115.69.33.14>
Aug 07 15:40:51 menai.shirehosting.com.au postfix/local[159690]: 58C755DC1799: to=<“test@abhcs.com.au”@menai.shirehosting.com.au>, or>

I confirm mail.log is not created in /var/log.

Seen a lot of people complaining about missing syslog, maybe for a while we should offer a transition solution to journalctl. This means to install the rsyslog package and configure it as it was in Debian 11, including the others like logrotate.

I did a test starting from Debian 11 which I upgraded to Debian 12. rsyslog is of course present and running and in /var/log are all the log files used by Virtualmin/Webmin in the past.

In the case of Fail2Ban package, it appears that we are already using journalctl, but if the log files structure from Debian 11 were to be used, changes would have to be made.

These are the log files that exist in Debian 12 before starting the Virtualmin installation

I’ll look into adding support for reading from journalctl when the regular mail log file doesn’t exist, and update this ticket…

2 Likes

@Jamie do I guess that means now since the mail log no longer exists ?

Thanks
Michael

mail.log file must join information coming from three units postfix , dovecot and saslauthd . Once it is done logrotate should take care of it like for the others.

If this is achieved we dont’t need rsync installed anymore.

He means on systems where mail.log or maillog does not exist, but there are journal units for postfix and/or dovecot and/or saslauthd. He doesn’t mean it will always use the journal. Obviously if there is a mail.log or maillog, there’s no need to do anything different from what we’ve always done.

Only if you want it to be in a text log. We don’t care. We’ll make it work with the journal, too. It’s not a huge difference, it just isn’t something we knew about until this thread. Our solution is going to be reading the journal directly, we have no plans to turn text logs back on, if the OS doesn’t log to text logs, by default. (But, you’re free to do so.)

And, logrotate may not be automatic. The journal handles its own rotation, so it’s possible that logrotate does not have configuration for mail.log (but it might). That’s not something Virtualmin generally messes with. We create logrotate configs for the files we create, but we don’t create mail.log/maillog, so that’s up to the distro, and may or may not exist on a system that no longer has it by default.

1 Like

Perfect, for some reason I read it a different way …

Thanks
Michael