HAProxy Enterprise Documentation 1.9r1

SMTP Health Checks

HAProxy Enterprise can monitor a Simple Mail Transfer Protocol (SMTP) service. Add the option smtpchk directive to your backend section and include a check parameter on each server line. The check is valid if the server response code starts with the number 2.

backend be_smtp
   option smtpchk
   server srv1 10.0.0.1:25 check
   server srv2 10.0.0.2:25 check

You can also monitor an Extended Simple Mail Transfer Protocol (ESMTP) service. Add the hello command to use, which is "HELO" for SMTP and "EHLO" for ESMTP. Follow this with the domain name to present to the server:

backend be_smtp
   option smtpchk EHLO mydomain.com
   server srv1 10.0.0.1:25 check
   server srv2 10.0.0.2:25 check

In the backend section:

option smtpchk [HELO|EHLO] [<domain>]

Turns on the SMTP check

Without any options, a HELO localhost is sent to the server.

HELO or EHLO (optional, requires <domain>)

Type of SMTP hello command to use: HELO for SMTP and EHLO for ESTMP. Any other value here with default back to HELO.

<domain> (optional, requires HELO or EHLO)

Domain name to present to the server


Next up

Service Mesh