Skip to content

Postfix

Common parts of every card (states, backoff, Unit and ExecReload, Test config, manual commands) are described in Monitor window.

Detected by systemd units postfix, postfix@* or binaries postfix
Read every 5 minutes while the Monitor window shows the tab
Active probe yes, off by default
Test config on demand
Manual commands 3

Postfix: the running master and its children, the configuration (a closed list of main.cf parameters, the services of master.cf), the queue directory’s file system and corrupt files; with the active probe the mail queue aggregated on the host (counts, sizes and age per queue, the most frequent deferral reasons as closed templates, the recipient domains of deferred mail).

Passive: the master is found in /proc (comm master, exe or, for a root master seen from another account, argv[0] under */postfix/, real and effective uid root or the session’s, the same PID namespace, a trusted file); with several masters (instances) the default instance’s is the one in $queue_directory/pid/master.pid or with the queue directory as its working directory (root only). Its children (smtpd, qmgr, …) of root, the session or mail_owner are only counted. A trusted postconf (fixed paths) prints -x <closed list>; on the host postfix/conf.awk keeps from each value only items of its class’s alphabet (? otherwise): never map contents, smtp_sasl_password_maps beyond its map types, inline/static maps, restriction arguments, header_checks/body_checks (not asked) or userinfo of relayhost. postconf -n gives only which of the listed names are set explicitly; postconf -M the services of master.cf with a closed list of -o keys (postfix/master.awk). No lookup is done (postconf may open the .cf files of some maps to read their settings, never their contents).

Active (off by default): postqueue -j (Postfix 3.1+, else -p) talks to showq; only when the master runs, main.cf is root’s or this account’s and not writable by others, and on a root session the $daemon_directory/$showq_service_name postqueue would run directly when showq does not answer is trusted. postfix/queue.awk aggregates on the host: addresses, queue ids, senders and the text of reasons never leave it.

Runs: postqueue -j (Postfix 3.1 or newer; older: postqueue -p) every 5 min while the Monitor is open: postqueue asks the showq service for the whole queue. On the host the answer is aggregated by awk to counts, bytes and the age of the oldest message per queue, the 10 most frequent deferral reasons as closed templates (connection timed out, refused, DNS, TLS, … with the SMTP reply code, the enhanced status code and the SMTP stage) and the 10 recipient domains with the most deferred messages; addresses, queue ids, senders and the text of reasons never leave the host. Only when a Postfix master runs (else postqueue would read the queue directly), postqueue is trusted, main.cf is root’s or this account’s and not writable by group/others, and on a root session $daemon_directory/$showq_service_name is trusted (postqueue runs it itself when showq does not answer). GNU or BusyBox timeout 20 s, at most 16 MiB of output read (more: counts marked “at least”)

Traces on the host: each run is one connection to showq (a short showq process; no log line in a normal setup); an account outside authorized_mailq_users gets “fatal: User … is not allowed to view the mail queue” in the mail log at every try, so a refusal stops the probe until Retry. The lock file kryodesk/postfix.lock (in $XDG_RUNTIME_DIR, else ~/.cache); no other files

What it does, as the card says: postconf -n reads main.cf and master.cf and prints the explicitly set parameters (sent to /dev/null here); its warnings (unknown, unused and deprecated parameters, syntax) and the exit code are shown, with the values after a parameter name masked on the host. It does no lookup (it may open the .cf files of some maps to read their settings), contacts no daemon and changes nothing. MAIL_CONFIG is set to the configuration directory. Not postfix check: that runs postfix-script, which may create missing queue directories and fix ownership and permissions.

KryoDesk shows these with Copy / Paste to terminal and never runs them.

Label Command What it does
Queue with addresses postqueue -p lists every queued message with its queue id, sender, recipients (personal data) and the full deferral reason; KryoDesk itself only counts them. Asks showq like the active probe
Full check (may change files) postfix check postfix check runs postfix-script: checks the configuration and the ownership and permissions of Postfix’s files and directories; run as root it may create missing queue directories and fix ownership. Usually needs root (sudo)
Explicit configuration postconf -n prints every explicitly set parameter of main.cf, including values KryoDesk keeps on the host (inline and static maps, restriction arguments, header_checks)

Scroll or pinch to zoom · drag to move · double-click to zoom · Esc or click outside to close