Haproxy on Pfsense

Has anyone configured HAProxy to send an email in case of backend errors? There is a ‘Global email notifications’ in settings, but I can’t get it to work and can’t find documentation on it…

Thanks for any help on this

I don’t believe there is a way to send an email that happens. You might look to see if there are logs when a config is saved and has errors. If so, then you can setup a log server like graylog and send email alerts whenever they show up in the logs.

The problem is that HA Proxy’s Mailers configuration is very basic and doesn’t offer any way of authenticating against an SMTP server. So it just tries to send emails through the server:port you’ve configured, which of course no email server with a sane configuration would ever allow.

On a Linux or standard FreeBSD server, you could work around this by using a local MTA such as postfix in a satellite configuration, or msmtp to relay the mails to an external mail server.

On pfSense, however, there seems to be no way for HA Proxy mailers to use the email settings already configured under System / Advanced / Notifications. Or at least there is no way to do it from the UI.