Administration
==============

The Administration GUI allows you to do common administration tasks
like updating software packages, manage quarantine, view service
status and manage mail queues. It also provides server statistics in
order to verify server health.


Server Administration
---------------------

Server status
~~~~~~~~~~~~~

image::images/screenshot/pmg-gui-server-status.png[]

This page shows server statistics about CPU, memory, disk and network
usage. You can select the displayed time span on the upper right.

Administrators can open a terminal window using the 'Console'
button. It is also possible to trigger a server 'Restart' or
'Shutdown'.


Services
~~~~~~~~

image::images/screenshot/pmg-gui-service-status.png[]

This panel lists all major services used for mail processing and
cluster synchronization. If necessary, you can start, stop or restart
them. The 'Syslog' button shows the system log filtered for the
selected service.

Please note that {pmg} uses {systemd} to manage services, so you can
also use the standard `systemctl` command line tool to manage or view
service status, for example:

-----
systemctl status postfix
-----


Updates
~~~~~~~

image::images/screenshot/pmg-gui-updates.png[]

We release software updates on a regular basis, and it is recommended
to always run the latest available version. This page shows the
available updates, and administrator can run an upgrade by pressing
the 'Upgrade' button.

See section xref:pmg_package_repositories[Package Repositories] for
details abaout available package repositories.


Syslog and Tasks
~~~~~~~~~~~~~~~~

image::images/screenshot/pmg-gui-syslog.png[]

The syslog page gives you a quick real-time log view. Please use the
xref:pmg_tracking_center[Tracking Center] to search the logs.


Quarantine
----------

Spam
~~~~

image::images/screenshot/pmg-gui-spam-quarantine.png[]

This panel lets you inspect the mail quarantine. Emails can be safely
previewed and if desired, delivered to the original user.

The email preview on the web interface is very secure as malicious
code (attacking your operating system or email client) is removed by
Proxmox.


Virus
~~~~~

Allows administrators to inspect quarantined virus mails.


[[pmg_userblackwhitelist]]
User White- and Blacklist
~~~~~~~~~~~~~~~~~~~~~~~~~

This is mostly useful to debug or verify white- and blacklist user
settings. The administrator should not change these values because
users can manage this themselves.


[[pmg_tracking_center]]
Tracking Center
---------------

image::images/screenshot/pmg-gui-tracking-center.png[]

Email processing is a complex task and involves several service
daemons. Each daemon logs information to the syslog service. The
problem is that a servers analyzes many emails in parallel, so it is
usually very hard to find all logs corresponding to a specific mail.

Introduced in {pmg} 2.1, the tracking center simplifies the search for
emails dramatically. We use highly optimized C-code to search the
available syslog data. This is very fast and powerful, and works for
sites processing several million emails per day.

The result is a list of received mails, including the following data:

[cols="s,5d"]
|====
|Time | Timestamp of first found syslog entry.
|From | Envelope 'From' address (the sender).
|To   | The email receiver address.
|Status | Delivery status.
|Syslog | The corresponding syslog entries are shown if you double click such
entry, or if you press the '+' button on the left.
|====

Please notice that you can specify filters, most important you can set
a 'Start' and 'End' time. By default the start time is set to one hour
ago. If you still get to much result entries, you can try to restrict
the search to specific sender or receiver addresses, or search for a
specific text in the logs ('Filter' entry).

NOTE: Search is faster if you use a short time interval.

The 'Status' field summarize what happens with an email. {pmg} is a
mail proxy, meaning that the proxy receives mails from outside,
process it and finally sends the result to the receiver.

The first phase is receiving the mail. The proxy may reject the mail
early, or instead accepts the mail and feeds it into the filter. The filter
rules can block or accept the mail.

In the second phase, accepted mails need to be delivered to the
receiver, and this action may also fail or succeed. The status
combines the result from the first and second phase:

[options="header",cols="2s,1d,5d"]
|====
|Status |Phase |Description
|rejected             |1 | Email rejected (e.g. sender IP is listed on a IP blacklist)
|greylisted           |1 | Email temporarily rejected by greylisting
|queued/deferred      |1 | Internal Email was queued, still trying to deliver
|queued/bounced       |1 | Internal Email was queued but not accepted by the target email server (e. g. user unknown)
|quarantine           |1 | Email was moved to quanantine
|blocked              |1 | Email was blocked by filter rules
|accepted/deferred    |2 | Email accepted, still trying to deliver
|accepted/bounced     |2 | Email accepted but not accepted by the target email server (e. g. user unknown)
|accepted/delivered   |2 | Email accepted and deliverd
|====


Postfix Queue Administration
----------------------------

TODO
