Files
Pulse/docs/MAIL_GATEWAY.md
pulse-triage[bot] 8fcd2fc515 Align History, Unified Resources, PBS, and PMG Help with runtime fixes
Document three already-landed monitoring and identity behaviours across
four unclaimed in-app Help guides and their mirrored public copies, with
source-bound Python regression tests:

- docs/METRICS_HISTORY.md and docs/UNIFIED_RESOURCES.md (+ mirrors):
  document Proxmox VE 9.3 persistent guest identity (uid, rtime) and
  cluster-id handling (#5161): chronological sibling-node History
  splicing across live migrations, pre-9.3 canonical ID continuity on
  first uid observation, distinct UID-based canonical IDs and withheld
  sibling History when a VMID is reused, and cluster-id guards against
  auto-merging namesake clusters or standalone nodes.
- docs/PBS.md (+ mirror): document native PBS node-status alert
  evaluation (#5139) in a separate native pbs series isolated from
  linked host agents and namesake hosts, percentage-point CPU threshold
  comparison (#5133), missing-observation handling on node-status read
  failure, and immediate clearing of stale metric alerts when PBS is
  offline or unhealthy.
- docs/MAIL_GATEWAY.md (+ mirror): document PMG startup-outage offline
  and unhealthy projection, scheduler-health and staleness error
  recording, automatic background reconnect with context-bound
  authentication, and intentional skipping of paused connections (#5200).
- scripts/tests/test_navigation_help_docs.py,
  scripts/tests/test_pbs_docs.py, and scripts/tests/test_pmg_docs.py:
  bind each documented behaviour directly to live Go runtime sources.

Contract-Neutral: Documentation, mirrored in-app Help, and Python doc-regression test alignment for already-landed runtime behaviour with no runtime, API, schema, or subsystem contract changes.
Change-source: pulse-maintainer
2026-11-27 17:55:43 +00:00

14 KiB

Proxmox Mail Gateway (PMG) monitoring

Pulse reads PMG mail statistics, queues, quarantine totals and cluster information. It does not send mail through PMG, release quarantined messages or repair its queues. Pulse's own alert email uses a separate SMTP destination in Alerts → Notifications; see email troubleshooting.

Add a PMG connection

  1. Open Settings → Infrastructure → Add infrastructure. Search for Proxmox Mail Gateway, or use Show more sources to reveal its card.
  2. Give the connection a recognisable name and the PMG API address, normally https://pmg.example.com:8006. Use the address reachable from the Pulse server, not just from your browser. Keep HTTPS and certificate verification enabled; correct the certificate trust or name rather than bypassing them.
  3. Choose Username & Password. Use a dedicated PMG service account, such as pulse-monitor@pmg, with the minimum read permissions supported by your PMG version for the data you need. Enter its password only in the private settings form; do not put it in a command, URL or issue report.
  4. Review the connection and save it. Check ordinary collection afterwards in Proxmox → Mail Gateway (/proxmox/mail). A successful connection test does not establish that queues, quarantine and every cluster node were read.

The current PMG credential form uses password authentication, not the PVE/PBS API-token setup. Do not follow a PVE/PBS token or privilege-separation recipe for PMG, or switch to root@pam merely to make a read succeed. An older setup hint that refers to PMG API-token fields does not change this form's contract. Use the PMG version's own account-management tools for the service account; do not grant mail-management or administrator privileges just to fill a panel.

Discovery is optional

If you already know the endpoint, add it directly; a network scan is not needed. Discovery in Settings → Infrastructure finds candidate platform APIs on configured networks for review. It does not authenticate or add a PMG connection by itself, and a missing candidate does not prove the gateway is unavailable. Only scan networks you administer and intend to scan. Do not broaden a scan or repeat discovery merely to diagnose missing statistics.

Collection scope and older releases

The connection form offers Mail statistics & trends, Queue health insights, Quarantine totals and Domain-level statistics. Domain statistics are off by default for a new connection. Published v6.6.0 and current source respect these saved switches for subsequent ordinary poll requests:

Saved option Reads it controls
Mail statistics & trends Mail statistics, hourly mail counts and spam-score distribution.
Queue health insights Each collected cluster node's queue status.
Quarantine totals Both spam and virus quarantine counts.
Domain-level statistics Relay-domain inventory and domain statistics.

Saving all four options off preserves that choice when settings are reopened. An older connection with no recorded scope keeps the legacy mail-statistics default until its collection scope is explicitly saved; all-zero legacy settings cannot distinguish an old opt-out from an unset default. Version, cluster and configuration-backup reads are independent of these four switches: all four off does not mean no PMG requests. Edits apply to the next poll, not requests already in flight. Disabling collection removes coverage; it does not dismiss an existing alert or establish recovery.

Published v6.5.0 does not contain this scope correction. In that version, mail, queue and quarantine requests can still run with their options off; domain statistics alone follow their switch. Do not rely on those three switches as a privacy boundary in v6.5.0, or assume development-source behaviour is present in an installed release. An absent chart is not evidence that requests stopped.

If PMG collection must stop, pause the PMG connection in Settings → Infrastructure, rather than deleting it or only disabling alerts. Pausing prevents subsequent ordinary polls; it does not cancel a request already in flight. PMG readings and alerts are unavailable or stale while paused, so use the gateway's own monitoring and arrange independent coverage. Restore only the connection you deliberately paused when it is safe to resume. Do not restart Pulse or alter PMG queues to verify an opt-out. While paused, skipped PMG polls do not record synthetic poll successes or clear an earlier failure in scheduler health or staleness tracking.

Read the Mail Gateway view

There is no PMG filter on a top-level Infrastructure monitoring page. Use Proxmox → Mail Gateway and clear its search and status filters before treating an absent row as a missing connection. Expand the intended gateway's row to inspect its detail; compare connection and node identity, not just a similar name in another installation.

Reading Meaning and limits
Mail, Spam, Virus Collected counts, not a mail-delivery receipt or a configurable spam-rate threshold. The drawer labels its mail-statistics timeframe; compare the same window in PMG.
Queue, Deferred Reported backlog across collected nodes. The node details separate active, deferred, held and incoming messages, and show the oldest-message age where available.
Quarantine Collected category totals, not a list of messages awaiting your review or permission to release them.
Gateway/node state Connection and alert context, not proof that all datasets are complete or that intended recipients received mail. Inspect any attention reason and the affected reading separately.
Domain detail Optional domain statistics; an absent section is not proof of zero traffic. The drawer shows only the top eight reported domains, not the entire domain inventory.

Healthy is not complete collection. The gateway can remain online after a mail-statistics, node-queue or quarantine read fails. Some missing fields can display as zero or an empty section. A recent overall update time, a green badge or one populated panel does not prove that every dataset was read. Compare the affected value and observation window with PMG's own existing view before acting on an apparent empty queue or quarantine.

Published v6.6.0 records downstream read failures as incomplete collection while retaining the successful version connection. Missing readings do not become observed zero totals or resolve their metric alerts. Partial queue data can still raise the highest configured severity, but cannot clear or downgrade an existing alert; quarantine recovery requires both categories. These collector safeguards do not make every empty display a verified zero.

When readings are stale

An independent availability check (such as an HTTPS or port check) can keep passing while the PMG poll stops or lags. A passing availability check does not make mail, queue or quarantine counts current.

When the PMG poll is stale, Proxmox → Mail Gateway keeps the retained mail, quarantine and node queue counts visible so you do not lose the last known figures, labels the row Readings stale, and takes the gateway out of Healthy into Degraded in the status filter:

  • Offline and critical alerts stay visible: An explicitly Offline gateway remains under Offline, and open critical alerts keep their alert indicator alongside Readings stale.
  • Row details separate quiet polls from PMG faults: Expanding the row shows Readings stale. Showing the last poll. together with any actual PMG-reported degradation reason (such as unhealthy cluster nodes, queue backlog or non-healthy connection health), without attributing a quiet poll to PMG itself.
  • Recovery updates live: When a fresh PMG poll arrives, the view updates the counts, clears Readings stale and restores Healthy (when no offline state or open alert remains) without reloading or restarting Pulse.

Older published releases may not display Readings stale when another source keeps the gateway online. On those builds, compare the reading time and PMG's own view directly. While PMG readings are stale, check whether the connection is paused in Settings → Infrastructure, check poll-progress signals and the bounded Pulse log readers, and rely on PMG's own queue view until fresh polls resume.

Alerts

Open Alerts → Thresholds → Proxmox and find Mail Gateway Thresholds. The configurable PMG thresholds cover total, deferred and held queue counts, oldest-message age in minutes, spam/virus quarantine counts, and quarantine growth percentage plus minimum message growth. Check the saved values and the intended gateway's overrides; a queue-count threshold is not a percentage.

PMG also has connectivity and mail anomaly checks, but the displayed spam/virus counts do not expose a user-configurable spam-rate or delivery-failure threshold. An alert in Pulse does not guarantee a notification was routed or received. Follow notification checks for that separate path. Do not send test mail, fill a queue, release quarantine or lower a production threshold merely to generate an alert.

Troubleshooting without changing the gateway

Use the original error, time and affected dataset before changing credentials or permissions:

Observation First check
Connection refused or timed out The saved scheme, host and port, and the network path from the Pulse server. Browser access is a different path; refusal is not a password verdict.
Certificate validation error The certificate name, expiry and trusted chain for that endpoint. Do not disable verification or change to HTTP.
401/403 The configured account and its read permissions for the specific failed request, privately. Do not grant administrator access as a diagnostic shortcut.
Gateway is present but statistics are missing Clear view filters, check whether the connection is paused, and compare the particular dataset and time window with PMG. A successful test or version read does not establish dataset access.
Readings stale appears while the gateway responds An independent availability check can pass while the PMG poll is quiet. Follow When readings are stale and check PMG's own queue view without restarting or re-adding the connection.
Cluster nodes or node queues are missing Compare the gateway's existing cluster inventory and each affected node's native queue view. One reachable node does not prove every node was collected.

Startup outages and automatic reconnection

If a non-paused PMG connection fails during Pulse startup because the gateway is unreachable, TLS validation fails, or authentication is rejected, Pulse does not silently omit the gateway or mark it healthy before its first connectivity poll succeeds. Pulse immediately publishes an offline and unhealthy state, records the error in scheduler health and staleness tracking, and keeps the saved gateway configured.

While the connection remains enabled, Pulse retries client creation in the background with context-bound authentication so the gateway can recover once reachable without restarting Pulse or deleting and re-adding the connection. Paused PMG connections are skipped intentionally during startup and reconnect retries.

Response decoding is not a network verdict

An error such as pmg_queue_status followed by failed to decode response or cannot unmarshal array means Pulse received a response it could not interpret. It does not, by itself, establish that the gateway is unreachable, the password is wrong or the queue is empty. A separate transport or permission error still needs its own assessment; a successful Test Connection does not resolve the decoding failure.

Upgraded from v6.5.0 to v6.6.0? In v6.5.0, a queue-read failure could be logged only at Debug level while the connection appeared healthy. In v6.6.0, the same failure counts as a failed ordinary poll, even after a successful version read or connection test. Newly visible pmg_queue_status errors do not establish that your network or credentials changed, or that queue readings were correct before the upgrade. Keep any other reported failure separate.

If you deliberately turn off Queue health insights on v6.6.0, subsequent polls omit queue reads under the saved collection scope. That can remove this error by removing the failed read, not by repairing it. Keep independent queue monitoring while fresh queue readings are unavailable. Pulse cannot evaluate new queue data with collection off; retained alerts do not establish current queue health. Do not repeatedly toggle collection to diagnose the failure.

Use PMG's own existing queue view for queue status while Pulse cannot read it. Keep the affected dataset, original time and short redacted error for the report; do not attach the full queue response, which can contain mail details. Do not change DNS, disable certificate verification, grant broader permissions, re-add the connection or retry, delete or release mail to diagnose a decoder error. Turning off queue collection removes coverage; it does not repair decoding or establish that an existing alert has recovered.

For a new connection, allow its configured polling interval rather than a fixed one- or two-cycle promise. If a previously working reading stops advancing, retain that observation and the original bounded error; do not repeatedly test, scan, restart, re-add the connection or change the mail system to reproduce it. Use the bounded Pulse log readers for your actual deployment if needed. Do not enable Debug to obtain more data.

A useful report names the running Pulse/PMG versions, affected view and dataset, original time/sequence, expected versus displayed value and matching native time window, plus the relevant redacted error. Use consistent placeholders for private gateway/node/domain identities. Keep passwords, tickets, tokens, mail addresses, subjects, message contents, full API responses, configuration and unredacted screenshots private. Unavailable evidence is unknown, not zero; do not recreate mail traffic or repeat a failing action to obtain it.