1

Please advise:

I was asked to configure HAProxy on Ubuntu, with very little knowledge. The current configuration load-balances about 20 webservers and monitors them for heartbeat. whenever a site comes down, it generates an email alert. The thing is that I want to send it to two addresses, but it only takes the last one (only addr2@local.com gets an email). I tried these different syntax formats but none worked.

email-alert to "addr1@local.com,addr2@local.com"
email-alert to addr1@local.com,addr2@local.com
email-alert to addr1@local.com;addr2@local.com

Relevant snippet from the conf:

//some global conf

mailers mailsrv
        mailer smtp1 123.123.123.123:25

//some frontends

backend be80
        option httpchk HEAD /
        email-alert mailers mailsrv
        email-alert level info
        email-alert from hapsrv@local.com
        email-alert to addr1@local.com
        email-alert to addr2@local.com

Thanks

Yaniv
  • 11
  • 2

1 Answers1

0

The email-alert feature only supports 1 email address, but since the configuration file parser does not parse email addresses, it does not return an error in your case. HAProxy will send one RCPT TO to the SMTP server using the string you provided, so technically, it is the email server that only select the last email address from the list.

TLDR: you can only use 1 email address.

odc
  • 111
  • 1