+[[chapter_stats]]
Statistics
==========
-{pmg} offers a useful and feature-rich statistics interface, which allows the
-administrators to quickly see the general workload and makes it easy to identify
-problems.
+{pmg} provides a useful and feature-rich statistics interface that allows
+administrators to quickly get an overview of the overall workload and easily
+identify problems.
-The statistics are shown for the selected time range, which defaults to the
-current day, but can be changed to any other day, a whole month, or even a
-whole year.
+The statistics are displayed for a selected period, which by default is the
+current day. This period can be changed to any other day, a whole month or even
+a whole year.
+
+[thumbnail="pmg-gui-statistics-general.png", big=1]
On the main statistics page there are three graphs with additional data:
'Incoming Mails'::
-Shows the incoming mail counts as a graph and the following details
-(as counts and percentages of the incoming mail volume):
+Displays the count of incoming mails from each of the following categories,
+including their percentage of the total incoming mail volume:
* Incoming Mails
* Junk Mails (Virus + Spam + Greylisted + SPF rejects + RBL rejects)
'Outgoing Mails'::
-Shows the outgoing mail counts as a graph and the following details
-(as counts and percentages of the outgoing mail volume):
+Displays the count of outgoing mails from each of the following categories,
+including their percentage of the total outgoing mail volume:
* Outgoing Mails
* Bounces (mails with an empty envelope-sender address)
* Virus Mails
+[[pmgstats_spam_scores]]
Spam Scores
-----------
-This panel shows the distribution of the different spam scores for the selected
-time frame.
+[thumbnail="pmg-gui-statistics-spam-scores.png", big=1]
+
+The `Spam Scores` panel shows the distribution of the different spam scores for
+the selected time period. Note that you can also select a whole month or even a
+whole year as period to display.
+[[pmgstats_viruses]]
Virus Charts
------------
-This panel shows which and how many viruses were detected in the selected
-time frame.
+[thumbnail="pmg-gui-statistics-virus-charts.png"]
+
+The `Virus Charts` panel gives you an overview of how many virus files were
+tried to be transmitted through your mail infrastructure, but got caught early
+by the {pmg}.
+
+The list shows which and how often a certain viruses were detected in the
+selected time period.
+See xref:pmgconfig_clamav[Virus Detector Configuration] for details about how
+{pmg} scans for virus files.
+
+[[pmgstats_hourly_distribution]]
Hourly Distribution
-------------------
-Shows the amount of incoming and outgoing mail per hour for the selected
-time frame.
+[thumbnail="pmg-gui-statistics-hourly-distribution.png", big=1]
+
+The `Hourly Distribution` shows the amount of incoming and outgoing mail per
+hour for the selected time period. For periods spanning a whole month or a
+whole year the arithmetic average of mail volume in an hour will be shown.
+[[pmgstats_postscreen]]
Postscreen
----------
-Contains a chart with the RBL and pregreet rejects for the selected time frame.
+[thumbnail="pmg-gui-statistics-postscreen.png"]
+
+Contains a chart with the RBL (Real-time Blackhole Lists) and `pregreet`
+rejects for the selected time frame.
+
+[quote, Postfix Postscreen Howto]
+____
+For each connection from an SMTP client, postscreen(8) performs a number of
+tests in the order as described below. Some tests introduce a delay of a few
+seconds. postscreen(8) maintains a temporary allowlist for clients that pass
+its tests; by allowing allowlisted clients to skip tests, postscreen(8)
+minimizes its impact on legitimate email traffic.
+____
+
For more info about postscreen and pregreet tests, see the
https://www.postfix.org/POSTSCREEN_README.html[postscreen readme].
+[[pmgstats_domain]]
Domain
------
-Contains a summary for the recipient domain of the incoming and outgoing mails
-of the selected time frame, with traffic, count, how many viruses were detected,
-and how much of it was spam.
+[thumbnail="pmg-gui-statistics-domain.png"]
+
+The `Domain` view is split into two tabs, one for incoming and one for outgoing
+mails.
+
+Each tab shows a list of domains that received mails in a selected time frame,
+with stats for:
+
+* traffic amount
+* counts for:
+** mail flow to a domain
+** how many viruses were detected,
+** and how many mails were classified as spam
+[[pmgstats_sender]]
Sender
------
-This panel contains a list of e-mail addresses that sent mail out in the
-selected time frame, with a total count, how many viruses were detected and how
-big these mails were.
+[thumbnail="pmg-gui-statistics-sender.png", big=1]
+
+The `Sender` panel contains a list of e-mail addresses that sent mail out in
+the selected time frame, with a total count, how many viruses were detected and
+how big these mails were.
If you click on one of these e-mail addresses, you see a detailed list of
recipients, complete with size, date and time.
+[[pmgstats_receiver]]
Receiver
--------
+[thumbnail="pmg-gui-statistics-receiver.png"]
+
Similar to the `Sender` panel, this contains a list of e-mail addresses that
received e-mails from outside, with a total, spam and virus count, as well
as the total mail size.
If you click an entry, it shows a detailed list of mails with size, date,
time, virus and spam score info.
-If the `advanced statistics filters` are active, only active accounts will be
-listed. Active accounts are those which sent mail in the selected time frame
-or up to 90 days before.
+If the `Use advanced statistics filters` option (`Configurations -> Options`)
+is enabled, only active accounts will be listed. Active accounts are those that
+sent mail during the selected time period or up to 90 days before.
+[[pmgstats_contact]]
Contact
-------
+[thumbnail="pmg-gui-statistics-contact.png"]
+
This contains the list of external recipients that received mail from this
{pmg}, coming in on the internal port, with total count, virus count and size.
If you click an entry, it shows a list of mails with size, date and time.
-If the `advanced statistics filters` are active, active accounts will be
-filtered out, since they can already be seen in the `Receiver` panel. Active
-accounts are those which sent mail in the selected time frame or up to 90 days
-before.
+If the `Use advanced statistics filters` option (`Configurations -> Options`)
+is enabled, active accounts will be filtered out, since they can already be
+seen in the `Receiver` panel. Active accounts are those which sent mail in the
+selected time frame or up to 90 days before.