]> git.proxmox.com Git - pmg-docs.git/blame_incremental - pmg-administration.adoc
rule system: add a small section about matching rules
[pmg-docs.git] / pmg-administration.adoc
... / ...
CommitLineData
1Administration
2==============
3
4The Administration GUI allows you to carry out common tasks
5such as updating software packages, managing quarantines, viewing the
6status of services, and managing mail queues. It also provides server
7statistics, in order to verify server health.
8
9
10Server Administration
11---------------------
12
13Status
14~~~~~~
15
16[thumbnail="pmg-gui-server-status.png", big=1]
17
18This page shows statistics about server CPU, memory, disk and network
19usage. You can select the displayed time span from the upper right.
20
21Administrators can open a terminal window using the 'Console'
22button. It is also possible to trigger a server 'Restart' or
23'Shutdown'.
24
25
26Services
27~~~~~~~~
28
29[thumbnail="pmg-gui-service-status.png", big=1]
30
31This panel lists all the major services used for mail processing and
32cluster synchronization. If necessary, you can start, stop or restart
33them. The 'Syslog' button shows the system log, filtered for the
34selected service.
35
36Please note that {pmg} uses {systemd} to manage services, so you can
37also use the standard `systemctl` command-line tool to manage or view
38service status, for example:
39
40-----
41systemctl status postfix
42-----
43
44
45[[pmg_updates]]
46Updates
47~~~~~~~
48
49[thumbnail="pmg-gui-updates.png", big=1]
50
51We release software updates on a regular basis, and it is recommended
52to always run the latest available version. This page shows the
53available updates, and administrators can run an upgrade by pressing
54the 'Upgrade' button.
55
56See section xref:pmg_package_repositories[Package Repositories] for
57details about the available package repositories.
58
59
60Syslog and Tasks
61~~~~~~~~~~~~~~~~
62
63[thumbnail="pmg-gui-syslog.png", big=1]
64
65The Syslog page gives you a quick real-time log view. You can use the
66xref:pmg_tracking_center[Tracking Center] to search the logs.
67
68The Tasks page provides a history of the administration tasks that you
69carried out on the server, such as upgrading the system. Each task
70entry provides status information about the task, as well as the
71output.
72
73Quarantine
74----------
75
76[[pmgadministration_spam_quarantine]]
77Spam
78~~~~
79
80[thumbnail="pmg-gui-spam-quarantine.png", big=1]
81
82This panel lets you inspect the mail quarantine. Emails can be safely
83previewed and if desired, delivered to the original user.
84
85The email preview on the web interface is very secure, as malicious
86code (attacking your operating system or email client) is removed by
87{pmg}.
88
89Users can access their personalized quarantine via the daily spam report or by
90navigating to the URL configured for the quarantine (defaults to
91`https://<pmg-host>:8006/quarantine`) and logging in with their LDAP credentials
92(email address and password).
93
94You can additionally enable user self-service for sending an access link from
95the Quarantine Login page.
96To enable this on the Quarantine Login page, edit `/etc/pmg/pmg.conf`. See section
97xref:pmgconfig_spamdetector_quarantine[Spam Detector Configuration - Quarantine]
98for more details about the available settings.
99
100
101Virus
102~~~~~
103
104Allows administrators to inspect quarantined virus mails.
105
106
107Attachment
108~~~~~~~~~~
109
110Allows administrators to inspect quarantined mails and download their
111attachments or deliver/delete them.
112
113NOTE: Use the options of the 'Remove attachment' action to control the Attachment Quarantine.
114
115
116[[pmg_userblackwhitelist]]
117User White- and Blacklist
118~~~~~~~~~~~~~~~~~~~~~~~~~
119
120This is mostly useful to debug or verify white- and blacklist user
121settings. The administrator should not change these values because
122users can manage this themselves.
123
124
125[[pmg_tracking_center]]
126Tracking Center
127---------------
128
129[thumbnail="pmg-gui-tracking-center.png", big=1]
130
131Email processing is a complex task and involves several service
132daemons. Each daemon logs information to the syslog service. The
133problem is that a server analyzes many emails in parallel, so it is
134usually very hard to find all logs corresponding to a specific mail.
135
136The Tracking Center simplifies the search for
137emails dramatically. We use highly optimized and safe Rust footnote:[A language
138empowering everyone to build reliable and efficient software.
139https://www.rust-lang.org/] code to search the available syslog data. This is
140very fast and powerful, and works for sites processing several million emails
141per day.
142
143The result is a list of received mails, including the following data:
144
145[cols="s,5d"]
146|====
147|Time | Timestamp of first syslog entry found
148|From | Envelope 'From' address (the sender)
149|To | The email receiver address
150|Status | Delivery status
151|Syslog | The corresponding syslog entries are shown if you double
152click such an entry or if you press the '+' button on the left
153|====
154
155To narrow the search down further, you can specify filters and set
156a 'Start' and 'End' time. By default, the start time is set to the
157last hour. If you still get too many entries, you can try to restrict
158the search to a specific sender or receiver address, or search for a
159specific text string in the logs ('Filter' entry).
160
161NOTE: Search is faster if you use a shorter time interval.
162
163The 'Status' field summarizes what happened with an email. {pmg} is a
164mail proxy, meaning that the proxy receives mails from outside,
165processes them and finally sends the result to the receiver.
166
167The first phase is receiving the mail. The proxy may reject the mail
168early or accept the mail and feed it into the filter. The filter
169rules can then block or accept the mail.
170
171In the second phase, accepted mails need to be delivered to the
172receiver. This action may also fail or succeed. 'Status'
173combines the results from the first and second phase.
174
175[options="header",cols="2s,1d,5d"]
176|====
177|Status |Phase |Description
178|rejected |1 | Email rejected (for example, the sender IP is listed on an IP blacklist)
179|greylisted |1 | Email temporarily rejected by greylisting
180|queued/deferred |1 | Internal email was queued, still trying to deliver
181|queued/bounced |1 | Internal email was queued but not accepted by the target email server (for example, user unknown)
182|queued/delivered |1 | Internal email was queued and delivered
183|quarantine |1 | Email was moved to quarantine
184|blocked |1 | Email was blocked by filter rules
185|accepted/deferred |2 | Email accepted, still trying to deliver
186|accepted/bounced |2 | Email accepted, but not accepted by the target email server (for example, user unknown)
187|accepted/delivered |2 | Email accepted and delivered
188|====
189
190[[postfix_queue_administration]]
191Postfix Queue Administration
192----------------------------
193
194[thumbnail="pmg-gui-queue-admin-summary.png", big=1]
195
196Mail-queues are one of the central concepts of the SMTP protocol. Once a
197mail server accepts a mail for further processing it saves it to a queue.
198After the mail is either relayed to another system, stored locally
199or discarded, it is deleted from the local mail-queue.
200
201If immediate processing is not possible, for example because a downstream
202mail server is not reachable, the mail remains on the queue for later
203processing.
204
205The 'Queue Administration' panel provides a summary about the current state
206of the postfix mail-queue, similar to the 'qshape (1)' command-line utility.
207It shows domains for which mails were not delivered, and how long they have
208been queued.
209
210The three Action Buttons on top provide the most common queue operations:
211
212'Flush Queue'::
213
214Attempt to deliver all currently queued mail, for example if a downstream
215server has become available again.
216
217'Delete All Messages'::
218
219Delete all currently queued mail, for example if the queue contains only spam.
220
221'Discard address verification database'::
222
223Clear the recipient verification cache.
224
225A sudden increase in queued mails should be closely inspected. This
226increase can indicate issues connecting to downstream servers or that
227one of the servers for which you relay emails sends spam itself.
228
229Deferred Mail
230~~~~~~~~~~~~~
231[thumbnail="pmg-gui-queue-admin-deferred.png"]
232
233In the 'Deferred Mail' tab, you can examine each deferred email
234separately. In addition to providing contact information about the
235sender and receiver, you can also check the reason for which an email
236remains queued.
237
238You can view the complete headers and filter by sender or receiver of
239queued emails.
240
241Here, you can also flush or delete each deferred email independently.
242
243
244[[pmg_firmware_updates]]
245Firmware Updates
246----------------
247Firmware updates from this chapter should be applied when running {pmg} or
248Debian on a bare-metal server. Whether configuring firmware updates is
249appropriate within a virtualized environment, e.g. when using device
250pass-through, depends strongly on your setup and is therefore out of scope.
251
252In addition to regular software updates, firmware updates are also important for
253reliable and secure operation.
254
255When obtaining and applying firmware updates, a combination of available options
256is recommended to get them as early as possible or at all.
257
258The term firmware is usually divided linguistically into microcode (for CPUs)
259and firmware (for other devices).
260
261
262[[pmg_firmware_persistent]]
263Persistent Firmware
264~~~~~~~~~~~~~~~~~~~
265This section is suitable for all devices. Updated microcode, which is usually
266included in a BIOS/UEFI update, is stored on the motherboard, whereas other
267firmware is stored on the respective device. This persistent method is
268especially important for the CPU, as it enables the earliest possible regular
269loading of the updated microcode at boot time.
270
271CAUTION: With some updates, such as for BIOS/UEFI or storage controller, the
272device configuration could be reset. Please follow the vendor's instructions
273carefully and back up the current configuration.
274
275Please check with your vendor which update methods are available.
276
277* Convenient update methods for servers can include Dell's Lifecycle Manager or
278Service Packs from HPE.
279
280* Sometimes there are Linux utilities available as well. Examples are
281https://network.nvidia.com/support/firmware/mlxup-mft/['mlxup'] for NVIDIA
282ConnectX or
283https://techdocs.broadcom.com/us/en/storage-and-ethernet-connectivity/ethernet-nic-controllers/bcm957xxx/adapters/software-installation/updating-the-firmware/manually-updating-the-adapter-firmware-on-linuxesx.html['bnxtnvm'/'niccli']
284for Broadcom network cards.
285
286* https://fwupd.org[LVFS] could also be an option if there is a cooperation with
287a https://fwupd.org/lvfs/vendors/[vendor] and
288https://fwupd.org/lvfs/devices/[supported hardware] in use. The technical
289requirement for this is that the system was manufactured after 2014, is booted
290via UEFI and the easiest way is to mount the EFI partition from which you boot
291(`mount /dev/disk/by-partuuid/<from efibootmgr -v> /boot/efi`) before installing
292'fwupd'.
293
294TIP: If the update instructions require a host reboot, please do not forget
295about it.
296
297
298[[pmg_firmware_runtime_files]]
299Runtime Firmware Files
300~~~~~~~~~~~~~~~~~~~~~~
301This method stores firmware on the {pmg} operating system and will pass it to a
302device if its xref:pmg_firmware_persistent[persisted firmware] is less recent.
303It is supported by devices such as network and graphics cards, but not by those
304that rely on persisted firmware such as the motherboard and hard disks.
305
306In {pmg} the package `pve-firmware` is already installed by default. Therefore,
307with the normal xref:pmg_updates[system updates (APT)], included firmware of
308common hardware is automatically kept up to date.
309
310An additional xref:pmg_debian_firmware_repo[Debian Firmware Repository] exists,
311but is not configured by default.
312
313If you try to install an additional firmware package but it conflicts, APT will
314abort the installation. Perhaps the particular firmware can be obtained in
315another way.
316
317
318[[pmg_firmware_cpu]]
319CPU Microcode Updates
320~~~~~~~~~~~~~~~~~~~~~
321Microcode updates are intended to fix found security vulnerabilities and other
322serious CPU bugs. While the CPU performance can be affected, a patched microcode
323is usually still more performant than an unpatched microcode where the kernel
324itself has to do mitigations. Depending on the CPU type, it is possible that
325performance results of the flawed factory state can no longer be achieved
326without knowingly running the CPU in an unsafe state.
327
328To get an overview of present CPU vulnerabilities and their mitigations, run
329`lscpu`. Current real-world known vulnerabilities can only show up if the {pmg}
330host is xref:pmg_updates[up to date], its version not
331xref:faq-support-table[end of life], and has at least been rebooted since the
332last kernel update.
333
334Besides the recommended microcode update via
335xref:pmg_firmware_persistent[persistent] BIOS/UEFI updates, there is also an
336independent method via *Early OS Microcode Updates*. It is convenient to use and
337also quite helpful when the motherboard vendor no longer provides BIOS/UEFI
338updates. Regardless of the method in use, a reboot is always needed to apply a
339microcode update.
340
341
342Set up Early OS Microcode Updates
343^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
344To set up microcode updates that are applied early on boot by the Linux kernel,
345you need to:
346
347. Enable the xref:pmg_debian_firmware_repo[Debian Firmware Repository]
348. Get the latest available packages: `apt update` (or use the web interface,
349 under Administration -> Updates)
350. Install the CPU-vendor specific microcode package:
351 - For Intel CPUs: `apt install intel-microcode`
352 - For AMD CPUs: `apt install amd64-microcode`
353. Reboot the {pmg} host
354
355Any future microcode update will also require a reboot to be loaded.
356
357
358Microcode Version
359^^^^^^^^^^^^^^^^^
360To get the current running microcode revision for comparison or debugging
361purposes:
362
363----
364# grep microcode /proc/cpuinfo | uniq
365microcode : 0xf0
366----
367
368A microcode package has updates for many different CPUs. But updates
369specifically for your CPU might not come often. So, just looking at the date on
370the package won't tell you when the company actually released an update for your
371specific CPU.
372
373If you've installed a new microcode package and rebooted your {pmg} host, and
374this new microcode is newer than both, the version baked into the CPU and the
375one from the motherboard's firmware, you'll see a message in the system log
376saying "microcode updated early".
377
378----
379# dmesg | grep microcode
380[ 0.000000] microcode: microcode updated early to revision 0xf0, date = 2021-11-12
381[ 0.896580] microcode: Microcode Update Driver: v2.2.
382----
383
384
385[[pmg_firmware_troubleshooting]]
386Troubleshooting
387^^^^^^^^^^^^^^^
388For debugging purposes, the set up Early OS Microcode Update applied regularly
389at system boot can be temporarily disabled as follows:
390
391. Reboot the host to get to the GRUB menu (hold `SHIFT` if it is hidden)
392. At the desired {pmg} boot entry press `E`
393. Go to the line which starts with `linux` and append separated by a space
394*`dis_ucode_ldr`*
395. Press `CTRL-X` to boot this time without an Early OS Microcode Update
396
397If a problem related to a recent microcode update is suspected, a package
398downgrade should be considered instead of package removal
399(`apt purge <intel-microcode|amd64-microcode>`). Otherwise, a too old
400xref:pmg_firmware_persistent[persisted] microcode might be loaded, even
401though a more recent one would run without problems.
402
403A downgrade is possible if an earlier microcode package version is
404available in the Debian repository, as shown in this example:
405
406----
407# apt list -a intel-microcode
408Listing... Done
409intel-microcode/stable-security,now 3.20230808.1~deb12u1 amd64 [installed]
410intel-microcode/stable 3.20230512.1 amd64
411----
412----
413# apt install intel-microcode=3.202305*
414...
415Selected version '3.20230512.1' (Debian:12.1/stable [amd64]) for 'intel-microcode'
416...
417dpkg: warning: downgrading intel-microcode from 3.20230808.1~deb12u1 to 3.20230512.1
418...
419intel-microcode: microcode will be updated at next boot
420...
421----
422
423To apply an older microcode potentially included in the microcode package for
424your CPU type, reboot now.
425
426[TIP]
427====
428It makes sense to hold the downgraded package for a while and try more recent
429versions again at a later time. Even if the package version is the same in the
430future, system updates may have fixed the experienced problem in the meantime.
431----
432# apt-mark hold intel-microcode
433intel-microcode set on hold.
434----
435----
436# apt-mark unhold intel-microcode
437# apt update
438# apt upgrade
439----
440====