Page 1 of 1

The mail traffic always show zero.

Posted: Tue 24. Sep 2024, 10:30
by akong77
I has build new keyhelp server and just use mail server service.
I has see user send mail and received mail.But the keyhelp panel traffic statistics always show zero.
I has see mail log.
How to fix it?
2024-09-24_163250.png
2024-09-24_163129.png
2024-09-24_163129.png (10.51 KiB) Viewed 11684 times

Re: The mail traffic always show zero.

Posted: Tue 24. Sep 2024, 10:44
by akong77
And I want know where is mail.log in Debian 12?

Re: The mail traffic always show zero.

Posted: Tue 24. Sep 2024, 11:00
by Jolinar
akong77 wrote: Tue 24. Sep 2024, 10:44 And I want know where is mail.log in Debian 12?
/var/log/mail.log

Re: The mail traffic always show zero.

Posted: Tue 24. Sep 2024, 11:02
by mhagge
There is no mail.log anymore, it is written to the journal with Debian12 - see e.g. here: https://think.unblog.ch/en/debian-12-no ... ournalctl/

Re: The mail traffic always show zero.

Posted: Tue 24. Sep 2024, 11:07
by 24unix
akong77 wrote: Tue 24. Sep 2024, 10:44 And I want know where is mail.log in Debian 12?
If you want it back, install rsyslog.

Re: The mail traffic always show zero.

Posted: Tue 24. Sep 2024, 11:20
by akong77
OK,Thanks every friend for my answer.
But I want know why no mail traffic.I has see incoming mail and outgoing mail.But it's always show zero.

Re: The mail traffic always show zero.

Posted: Tue 24. Sep 2024, 11:38
by Tobi
Traffic, databases and webspace are not calculated in realtime.

Database and webspace are updated every four hours and traffic once at night.

Re: The mail traffic always show zero.

Posted: Tue 24. Sep 2024, 12:28
by Alexander
Have a look into the settings of "Maintenance Intervals -> Update statistics".

Default is, it runs once every day around 00:00 -> 01:00 o'clock.

Re: The mail traffic always show zero.

Posted: Wed 25. Sep 2024, 04:07
by akong77
I has manual run update statistics.But it's show zero.

Re: The mail traffic always show zero.

Posted: Wed 25. Sep 2024, 09:44
by Alexander
Please activate support access (Configuration -> Support Access) and send me the server IP and SSH port via PM.

Re: The mail traffic always show zero.  [SOLVED]

Posted: Thu 26. Sep 2024, 12:27
by Alexander
The problem is fixed on the server and will be fixed in an upcoming update for affected servers.

Background:

For calculating the mail traffic, i use journalctl. After the traffic calculation is run for the first time, i only read the new logs. Journalctl has a system called "cursor" for this. The cursor specifies the location within the log (journalctl).
When the traffic calculation has not yet run, i don't have a "cursor", so i read the journalctl from the beginning, using the "--since" parameter. I used "--since=1970-01-01 01:00:00" for that. It turns out, that this is transferred to the time zone on the server (UTC+0800), and so it can be negative.
Journalctl would than complain about an invalid timestamp and not returning any results, and therefor no result were returned to calculate the traffic.

I have now modified the --since parameter value so the issue is fixed.

Re: The mail traffic always show zero.

Posted: Thu 26. Sep 2024, 13:36
by akong77
OK,Thanks for your reply and help.
Could it's my setup error or another question?

Re: The mail traffic always show zero.

Posted: Thu 26. Sep 2024, 13:47
by Alexander
No, your setup is fine. It is a bug in KeyHelp 24.2, which could affect servers with a time zone setting >= UTC+0200.

Re: The mail traffic always show zero.

Posted: Thu 26. Sep 2024, 15:30
by akong77
OK,Thanks a lot.