Server Monitoring2 min read

    How to Monitor Exim with Xitoring

    Share

    Overview

    Exim is a powerful Mail Transfer Agent used across countless Linux systems to manage email routing, delivery, and security. Monitoring Exim gives you visibility into queue health, delivery throughput, and potential security issues.

    Prerequisites

    • A Linux server running Exim
    • Xitogent agent installed on the server
    • An active Xitoring account

    Step 1 — Install Xitogent

    curl -s https://xitoring.com/install.sh | sudo bash -s -- --key=YOUR_API_KEY
    

    Step 2 — Enable the Exim Integration

    sudo xitogent integrate
    

    Select Exim from the available integrations. The agent will detect your Exim installation and start collecting metrics automatically.

    Key Metrics to Monitor

    Metric Description
    Mail Queue Size Total messages waiting for delivery
    Messages Delivered Successful deliveries per interval
    Messages Rejected Connections or messages rejected by policy
    Frozen Messages Messages stuck in the queue that cannot be delivered
    SMTP Connections Active and total SMTP connections
    Retry Queue Messages scheduled for re-delivery attempts

    Step 3 — Configure Triggers

    • Mail Queue Size (Warning) — Alert when queue depth exceeds normal levels
    • Frozen Messages (Critical) — Fires when messages become frozen, requiring manual intervention
    • Rejected Messages (Warning) — Triggers on high rejection rates that may indicate abuse or misconfiguration

    Best Practices

    1. Monitor frozen messages closely — Frozen messages won't deliver without intervention; set up critical alerts
    2. Track queue age — Old messages in the queue indicate persistent delivery failures
    3. Use SMTP uptime checks — Verify Exim is accepting connections on ports 25 and 587 from external locations
    4. Review rejection logs — High rejection rates could indicate brute-force attacks or relay attempts

    Troubleshooting

    • No metrics: Verify Exim is running with systemctl status exim4 (Debian/Ubuntu) or systemctl status exim (RHEL/CentOS)
    • Queue growing: Run exim -bp to inspect the queue and exim -Mvl <message-id> to view message logs
    • Frozen messages: Use exim -Mg <message-id> to thaw or exim -Mrm <message-id> to remove