The SMTP monitor tests for SMTP service availability on a node. The monitor first tries to establish a TCP connection on the specified port. If it establishes a connection, the service banner is checked for a valid response (starts with 220). If the banner is valid, the monitor sends a HELO SMTP command, identifying itself with the hostname of the OpenNMS server, and makes sure the service answers with a valid response (starts with 250). If that response to the HELO is valid, the monitor issues a QUIT SMTP command. The service is considered available if the service’s answer to the HELO command is valid (starts with 221).

Simulate the behavior with telnet or netcat:

$ nc -v 25
Ncat: Version 7.60 ( )
Ncat: Connected to 2607:f8b0:4002:c06::1a:25.
220 ESMTP j17-v6si13545102ywb.87 - gsmtp
250 at your service
221 2.0.0 closing connection j17-v6si13545102ywb.87 - gsmtp

Monitor facts

Class Name


Configuration and use

Table 1. Optional monitor-specific parameters for the SmtpMonitor
Parameter Description Default


TCP port to connect to.



Number of attempts to find the service available.



The following example uses CentOS/RHEL path names. For Debian/Ubuntu, use /var/lib/opennms/rrd/response.

<service name="SMTP" interval="300000" user-defined="false" status="on">
  <parameter key="retry" value="1" />
  <parameter key="timeout" value="3000" />
  <parameter key="port" value="25" />
  <parameter key="rrd-repository" value="/opt/opennms/share/rrd/response" />
  <parameter key="rrd-base-name" value="smtp" />
  <parameter key="ds-name" value="smtp" />
<monitor service="SMTP" class-name="org.opennms.netmgt.poller.monitors.SmtpMonitor" />