The mail traffic always show zero.  [SOLVED]

General discussions around KeyHelp.
Post Reply
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

The mail traffic always show zero.

Post 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 3585 times
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: The mail traffic always show zero.

Post by akong77 »

And I want know where is mail.log in Debian 12?
User avatar
Jolinar
Community Moderator
Posts: 3829
Joined: Sat 30. Jan 2016, 07:11
Location: Weimar (Thüringen)
Contact:

Re: The mail traffic always show zero.

Post 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
Wenn jemand inkompetent ist, dann kann er nicht wissen, daß er inkompetent ist. (David Dunning)

Data Collector für Community Support
___
Ich verwende zwei verschiedene Schriftfarben in meinen Beiträgen /
I use two different font colors in my posts:
  • In dieser Farbe schreibe ich als Moderator und gebe moderative Hinweise oder begründe moderative Eingriffe /
    In this color, I write as a moderator and provide moderative guidance or justify moderative interventions
  • In dieser Farbe schreibe ich als Community Mitglied und teile meine private Meinung und persönlichen Ansichten mit /
    In this color, I write as a community member and share my personal opinions and views
User avatar
mhagge
Community Moderator
Posts: 532
Joined: Wed 8. Aug 2018, 15:19

Re: The mail traffic always show zero.

Post 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/
User avatar
24unix
Posts: 1825
Joined: Sun 21. Jun 2020, 17:16
Location: Kollmar
Contact:

Re: The mail traffic always show zero.

Post 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.
mfg Micha
--
95% aller Programmier halten sich für genial.
Der Rest immer noch für überdurchschnittlich.
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: The mail traffic always show zero.

Post 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.
User avatar
Tobi
Community Moderator
Posts: 3009
Joined: Thu 5. Jan 2017, 13:24

Re: The mail traffic always show zero.

Post by Tobi »

Traffic, databases and webspace are not calculated in realtime.

Database and webspace are updated every four hours and traffic once at night.
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
User avatar
Alexander
Keyweb AG
Posts: 4093
Joined: Wed 20. Jan 2016, 02:23

Re: The mail traffic always show zero.

Post 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.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: The mail traffic always show zero.

Post by akong77 »

I has manual run update statistics.But it's show zero.
User avatar
Alexander
Keyweb AG
Posts: 4093
Joined: Wed 20. Jan 2016, 02:23

Re: The mail traffic always show zero.

Post by Alexander »

Please activate support access (Configuration -> Support Access) and send me the server IP and SSH port via PM.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
Alexander
Keyweb AG
Posts: 4093
Joined: Wed 20. Jan 2016, 02:23

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

Post 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.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: The mail traffic always show zero.

Post by akong77 »

OK,Thanks for your reply and help.
Could it's my setup error or another question?
User avatar
Alexander
Keyweb AG
Posts: 4093
Joined: Wed 20. Jan 2016, 02:23

Re: The mail traffic always show zero.

Post 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.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: The mail traffic always show zero.

Post by akong77 »

OK,Thanks a lot.
Post Reply