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
    log local2

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

drft041 is localhost name defined in /etc/hosts:

xxxx.xxxx.xxxx.xxxx drft041

What do I do incorrectly?


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

mailer <mailername> <ip>:<port>

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  *               LISTEN      78928/master        

and haproxy config was set up as

mailers mymailers
  timeout mail 20s
  mailer smtp1

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
 email-alert to

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