New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
TroubleshootingUpdated 26 Oct 2026

Monitoring SMTP Availability: Probes, Synthetic Tests and Alerts for Mail Servers and Relays

How to monitor mail service availability: connection and banner checks, STARTTLS and certificate expiry, authentication and end-to-end send tests, queue and latency metrics, alert thresholds and runbooks.

EB
Written by Ethan Brooks
Transactional Email Specialist
Reviewed by Ishita Rao
  • Published14 Jan 2025
  • Read time6 min
  • Length1,226 words
Share this guide

A mail server can be "up" in the sense that its process is running and still be useless. The port may accept connections but never send a banner, TLS may fail because a certificate expired overnight, authentication may break after a configuration change or the queue may grow silently until messages are hours late. Simple ping or port checks miss these failures. Good monitoring tests the same steps a real client performs and measures what users care about: can a message be submitted, how long does it take to arrive and is anything piling up. This guide describes the layers of SMTP monitoring, the metrics worth collecting, sensible alert thresholds and how to build a runbook so that alerts lead to action instead of noise. It builds on reading an SMTP transcript, the mail queue and delivery monitoring and SLOs.

LayersNetwork, protocol, security, function and outcome
ProbesConnect, banner, EHLO, STARTTLS, AUTH and a real test message
MetricsQueue size and age, deferral and bounce rates, connection errors, latency, certificate days left
AlertsPage for user-visible failure; ticket for trends; always link an alert to a runbook step

The monitoring layers

LayerQuestionTypical check
NetworkCan a client reach the server?TCP connect to ports 25, 465 and 587 from outside; DNS resolution of the MX and host names
ProtocolDoes the server speak SMTP properly?Banner within a few seconds, valid EHLO response, capability list. See extensions
SecurityIs encryption valid?STARTTLS works, certificate valid for the host name, more than 14 days left, accepted protocol versions. See certificates
AuthenticationCan legitimate users log in?AUTH with a dedicated monitoring account over the submission port
FunctionDoes the server accept and queue mail?MAIL FROM, RCPT TO, DATA of a tiny test message to a controlled address
OutcomeDoes mail actually arrive, quickly?End-to-end test: send to a monitored mailbox and measure delivery time
Reputation and DNSAre we trusted and findable?Blocklist checks, SPF/DKIM/DMARC records present, PTR matches. See FCrDNS

Probe design

  1. Probe from outside your network, ideally from two or more regions, so that you see what customers and remote servers see, not only the inside view.
  2. Measure steps separately. Record time to connect, time to banner, time to TLS completion, time to authentication and time to the final 250 reply. A slow step points directly to the cause.
  3. Use a dedicated monitoring account and recipient. Limit its permissions and rate, and make sure its mail is not counted as customer traffic.
  4. Avoid false alarms. Require two or three consecutive failures from independent locations before paging, and treat one-off timeouts as warnings.
  5. Do not run intrusive tests against third parties or send high volumes from probes; one message every few minutes is enough.
  6. Test the whole route. If customers submit through a load balancer, a gateway and then the MTA, probe through the same path, and also test each component directly for diagnosis.
  7. Keep the probes themselves healthy. A dead monitoring server that stops alerting is worse than none; use a dead man's switch that alerts when probe results stop arriving.
# Nagios-style checks
check_smtp -H mail.example.com -p 25 -S -w 2 -c 5          # STARTTLS, warn at 2 s, critical at 5 s
check_smtp -H mail.example.com -p 587 -S -A LOGIN -U monitor -P "$PASS"
check_ssl_cert -H mail.example.com -p 587 -P smtp -w 21 -c 7   # days remaining (plugin dependent)

# Prometheus blackbox exporter module (example idea)
modules:
  smtp_starttls:
    prober: tcp
    tcp:
      query_response:
        - expect: "^220 "
        - send: "EHLO probe.example.net"
        - expect: "^250-STARTTLS"
        - send: "STARTTLS"
        - expect: "^220 "
      tls: true

Server and queue metrics

MetricWhy it mattersSuggested alert
Queue length (active and deferred)Growth means delivery is slower than inputWarn when it exceeds a few times the normal peak; page if it rises for 30 minutes
Age of the oldest messageShows real delay better than sizeWarn at 30 minutes, page at 2 hours for transactional systems. See retry schedules
Delivery rate (messages per minute)A sudden drop or spike signals trouble or abuseCompare with the same hour in previous weeks
Deferral rate by recipient domainOne provider throttling or blocking youWarn when above normal baseline for a large domain. See 421 errors
Bounce rate and categoriesBad data or reputation issues. See bounce classificationWarn above the usual rate; page on a block-type spike
Connection errors and timeoutsNetwork or remote problemsTrend, not single events
Authentication failuresBrute force or broken credentials. See brute-force defenceAlert on bursts per IP or account
TLS handshake failuresCertificate or protocol mismatchAlert on any rise
Disk and memory use of queue storageA full disk stops mailWarn at 70 percent, page at 85
Certificate days remainingExpiry causes sudden outageWarn at 21 days, page at 7

End-to-end tests

The most valuable check is also the simplest to describe: send a message and see whether it arrives. A scheduled job submits a tiny message with a unique identifier to a monitored mailbox, ideally at an external provider so the test crosses the internet, then polls the mailbox (via IMAP or an API) and records the time it took. If the message does not arrive within a threshold such as 5 minutes for transactional paths, raise an alert. Because remote mailboxes introduce their own delays, keep a baseline and alert on deviation rather than on one slow sample. For services with multiple outbound IPs or pools, send test messages through each. See IP pools. For senders using an API or webhooks, also verify that delivery events come back. See delivery events.

Alerting and runbooks

  • Alert on symptoms first. "Test messages not arriving" or "submission failing" are symptoms users feel; "CPU high" is a cause that may or may not matter.
  • Separate paging from tickets. Page for outages and imminent expiry; open tickets for slow trends, low disk forecasts and moderate deferral increases.
  • Attach a runbook to each alert, with the first three diagnostic commands, the person to contact and the safe remedies (restart, requeue, switch relay, pause campaigns).
  • Include context in the notification: which probe, which location, which step failed, the last successful time and a link to the dashboard.
  • Use maintenance windows so planned work does not wake people.
  • Review alerts monthly. Remove those that never lead to action and add checks for incidents you missed.

Dashboards

A good mail dashboard fits on one screen: probe status per location, end-to-end delivery time for the last day, queue size and oldest age, deferral and bounce rates by top recipient domains, authentication failures, certificate days remaining and blocklist status. Mark deployments and DNS changes on the time axis, because most incidents follow a change. Share a simplified status view with support so they can answer customers quickly.

Incident checklist

  1. Confirm from outside the network that the failure is real, and which step fails.
  2. Check recent changes: deployments, DNS, certificates, firewall rules, credentials.
  3. Check the queue and logs for the first error. See reading mail logs.
  4. Apply the safe remedy from the runbook and watch the probes recover.
  5. Communicate: update the status page and tell internal teams what to expect for queued mail.
  6. After recovery, verify the oldest queue entries are being delivered and the end-to-end test passes.
  7. Write a short post-incident note with cause, time to detect and time to fix, and add or tune a check.

Monitoring SMTP means testing as a client would, measuring delivery from end to end and alerting on what users feel. Probe from outside, watch the queue, track certificates and write a runbook for every alert, and incidents become short and unsurprising.

Check your sending IP status Add blocklist checks to your monitoring routine.

Open the blocklist check

References and further reading

Frequently asked questions

What should I monitor on an SMTP server?

Connection and banner, STARTTLS and certificate expiry, authentication, queue size and age, deferral and bounce rates and end-to-end delivery time.

Why is a port check not enough?

The port can be open while the banner, TLS, authentication or queue is broken.

How often should I run end-to-end tests?

Every few minutes for critical transactional paths, with a unique identifier per message.

What queue alert thresholds are sensible?

Warn when growth persists or the oldest message exceeds about 30 minutes; page at a couple of hours for transactional mail.

How do I avoid false alarms?

Probe from several locations and require consecutive failures before paging.

Topics#monitoring#alerts#uptime#probes#relay
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales