Example: Binary SMTP Health Check with Address Verification
- Last Updated: October 8, 2024
- 2 minute read
- LoadMaster
- LoadMaster GA
- Documentation
The pre-defined SMTP health check on LoadMaster works by opening a TCP connection to an SMTP server; it sets the up/down status of the server depending on whether the connection is successful or not.
In this section, you will create a custom health check that connects to the server and checks basic SMTP server operations by requesting verification of a specific user name from the server. The binary health check will:
Connect to the SMTP server.
- Send an SMTP command (VRFY) along with a specific mail user name (for example, ‘postmaster’). The server, if it is working properly, should respond positively to the verification request.
- Mark the server as up (if the server responds and a positive response is found to the query above); otherwise, it will be marked down.
First we will look at how the above exchange appears on the wire; again, as in the previous example, either telnet or Wireshark will do. In telnet, the exchange looks like this:
$ telnet 192.168.150.250 25220 Methuselah.local ESMTP PostfixVRFY postmaster252 2.0.0 postmasterQUIT221 2.0.0 ByeConnection to host lost.
VRFY postmaster is the Data to Send to the SMTP server, and the next line shown above is the expected Reply Pattern when the server is working properly.
To configure this into the LoadMaster WUI, you need the hexadecimal equivalent of the above:
Data to Send: 5652465920706f73746d61737465720d0a
Reply Pattern: 32353220322e302e3020706f73746d6173746572
The following screenshot shows how the binary health check settings should appear after configuring the settings above into the WUI: