Postfix
Bleemeo monitors the Postfix mail transfer agent through automatic service detection, SMTP service checks, and mail queue metrics.
Auto-Detection
Section titled “Auto-Detection”Glouton automatically detects Postfix instances listening on port 25. If the auto-detected parameters are incorrect, you can override them manually.
sudo tee /etc/glouton/conf.d/99-postfix.conf > /dev/null << 'EOF'service: # For a Postfix running outside a container - type: "postfix" address: "127.0.0.1" port: 25
# For an additional Postfix running outside a container - type: "postfix" instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE" address: "127.0.0.1" port: 26
# For a Postfix running in a Docker container - type: "postfix" instance: "CONTAINER_NAME" address: "172.17.0.2" port: 25EOFCreate or edit C:\ProgramData\glouton\conf.d\99-postfix.conf:
service: # For a Postfix running outside a container - type: "postfix" address: "127.0.0.1" port: 25
# For an additional Postfix running outside a container - type: "postfix" instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE" address: "127.0.0.1" port: 26
# For a Postfix running in a Docker container - type: "postfix" instance: "CONTAINER_NAME" address: "172.17.0.2" port: 25Service Check
Section titled “Service Check”Glouton performs an SMTP service check when the service listens on port 25.
| Metric | Description |
|---|---|
service_status | Status of Postfix |
Built-in Metrics
Section titled “Built-in Metrics”| Metric | Description |
|---|---|
postfix_queue_size | Number of mails queued |
Monitoring Troubleshooting
Section titled “Monitoring Troubleshooting”See Troubleshoot a Service Check or Missing Metrics for what applies to every service: finding the address and port Glouton really uses, what each check message means, and how to read the collection error — which does not appear in the agent logs at the default level.
The Service Check is not OK
Section titled “The Service Check is not OK”The check is a real SMTP exchange, not a bare connection:
| Status text | Cause | Fix |
|---|---|---|
Unable to connect to SMTP server: connection refused |
Postfix listens on another port, or inet_interfaces excludes the address Glouton uses |
Set address and port, or widen inet_interfaces |
SMTP error: ... |
Postfix answered, but rejected the exchange — a smtpd_client_restrictions rule, or a milter refusing the agent |
Allow the agent address, or point the check at a listener that accepts it |
Connection timed out after 10 seconds |
A firewall drops the packets | Open the port for the agent |
Metrics are Missing
Section titled “Metrics are Missing”The queue size is not read over SMTP: Glouton runs postqueue -p once a minute
and parses its output. For a containerized Postfix it runs the command inside
that container; otherwise it runs it on the host — including when the agent
itself is containerized, since it enters the host filesystem to do so.
Run the same command the agent runs, as the same user:
sudo -u glouton postqueue -pIt must print the queue, or Mail queue is empty. The error Glouton gets is
logged at the VERBOSE level only, as gather postfix queue size, so raise
logging.level before looking for it in
the agent logs.
| What you see | Cause | Fix |
|---|---|---|
postqueue: command not found |
The Postfix client tools are absent where the command runs | Install them there — on the host for a package installation |
| a permission error | postqueue refuses to run for the glouton user |
Check that postqueue keeps its set-gid bit on the mail queue |
an unknown hostroot error in the logs |
The agent runs in a container started without the host filesystem | Add -v /:/hostroot:ro to the agent container, as in the Docker installation |