Removing incomplete section 'mailers mymailers'

I try to add alerting to haproxy 1.7.2, CentOS7 and get the following warning:

May 11 11:06:27 drft041 haproxy-systemd-wrapper[22650]: [WARNING] 130/110627 (22651) : Removing incomplete section 'mailers mymailers'.

Here is the first lines of the config that defines mailers:

# Mailers
mailers mymailers
  timeout mail 20s
  mailer smtp1 drft041:25



#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
    
    log         127.0.0.1 local2

    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     15000 # orig: 4000
    user        haproxy
    group       haproxy
    daemon

drft041 is localhost name defined in /etc/hosts:

xxxx.xxxx.xxxx.xxxx drft041

What do I do incorrectly?

Thanks.

I don’t think you can specify a hostname, the documentation talks about an IP address:

mailer <mailername> <ip>:<port>

http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#3.6-mailer

I tried IP, too. The same error persists.

Here is netstat output:

[root@drft041 ~]# netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
       
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      78928/master        

and haproxy config was set up as

mailers mymailers
  timeout mail 20s
  mailer smtp1 127.0.0.1:25

Is email-alert correctly configured in a backend? Otherwise it may be lead to the error you are describing:

backend blablabackend
 email-alert mailers mymailers
 email-alert from test1@horms.org
 email-alert to test2@horms.org

Yes, there was a typo in backend section. Thanks alot!