Exim4
Bleemeo monitors the Exim4 mail transfer agent through automatic service detection, SMTP service checks, and mail queue metrics.
Auto-Detection
Section titled “Auto-Detection”Glouton automatically detects Exim instances listening on port 25.
To enable metrics gathering, ensure Glouton can run the mailq command. This usually means adding the following to your Exim configuration (e.g. /etc/exim4/conf.d/main/99_local):
queue_list_requires_admin=falseThen refresh the configuration:
update-exim4.conf.template --runupdate-exim4.confIf the auto-detected parameters are incorrect, you can override them manually.
sudo tee /etc/glouton/conf.d/99-exim4.conf > /dev/null << 'EOF'service: # For an Exim running outside a container - type: "exim" address: "127.0.0.1" port: 25
# For an additional Exim running outside a container - type: "exim" instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE" address: "127.0.0.1" port: 26
# For an Exim running in a Docker container - type: "exim" instance: "CONTAINER_NAME" address: "172.17.0.2" port: 25EOFCreate or edit C:\ProgramData\glouton\conf.d\99-exim4.conf:
service: # For an Exim running outside a container - type: "exim" address: "127.0.0.1" port: 25
# For an additional Exim running outside a container - type: "exim" instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE" address: "127.0.0.1" port: 26
# For an Exim running in a Docker container - type: "exim" 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 Exim |
Built-in Metrics
Section titled “Built-in Metrics”| Metric | Description |
|---|---|
exim_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 |
Exim listens on another port, or on another address | Set address and port, or widen local_interfaces |
SMTP error: ... |
Exim answered, but rejected the exchange — typically an ACL refusing the agent address | Allow the agent address in the connect ACL |
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”Glouton runs exim4 -bpc once a minute and reads the count it prints. For a
containerized Exim 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 exim4 -bpcIt must print a single number. The error Glouton gets is logged at the
VERBOSE level only, as gather exim queue size, so raise
logging.level before looking for it in
the agent logs.
| What you see | Cause | Fix |
|---|---|---|
permission denied |
Listing the queue is restricted to admin users — the Debian default | Set queue_list_requires_admin=false as shown above, then rebuild the configuration |
exim4: command not found |
The Exim client tools are absent where the command runs | Install them there — on the host for a package installation |
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 |