global user haproxy group haproxy ssl-server-verify none stats socket /run/haproxy.stats mode 660 group haproxy defaults timeout connect 5s timeout client 50s timeout server 50s balance roundrobin option redispatch default-server on-error fail-check inter 2m fastinter 1m downinter 10s observe layer4 check agent-port 1234 agent-check agent-inter 20s weight 255 email-alert from haproxy@random.lan email-alert to randomdan@random.lan email-alert level alert email-alert mailers smtp mailers smtp mailer defiant defiant:25 mailer firebrand firebrand:25 peers randomlan peer defiant defiant:1024 peer firebrand firebrand:1024 resolvers dns parse-resolv-conf hold valid 10m # HTTP listen http description Apache HTTP bind *:80 mode http default-server send-proxy-v2 observe layer7 server defiant defiant:11080 server firebrand firebrand:11080 # HTTPS listen https description Apache HTTPS bind *:443 mode tcp stick-table type ip size 20k peers randomlan stick on src default-server send-proxy-v2 check-ssl server defiant defiant:11443 server firebrand firebrand:11443 # SMTP listen smtp description Exim SMTP bind *:25 mode tcp option tcp-check tcp-check expect rstring ^220 default-server send-proxy-v2 server defiant defiant:11025 server firebrand firebrand:11025 # Submissions listen submissions description Exim SMTP bind *:465 mode tcp option tcp-check tcp-check expect rstring ^220 default-server send-proxy-v2 check-ssl server defiant defiant:11465 server firebrand firebrand:11465 # IMAPS listen imaps description Courier IMAP bind *:993 mode tcp stick-table type ip size 20k peers randomlan stick on src option tcp-check tcp-check expect rstring ^\*\ OK timeout client 2h timeout server 2h default-server check-ssl server defiant defiant:11993 server firebrand firebrand:11993 # DistCC listen distcc description DistCC bind *:3632 mode tcp balance leastconn timeout client 5m timeout server 5m timeout queue 10m maxconn 50 email-alert level emerg server danielg ipv4@danielg.random.lan:3632 maxconn 6 resolvers dns server firebrand ipv4@firebrand.random.lan:13632 maxconn 5 server defiant ipv4@defiant.random.lan:13632 maxconn 2 weight 50 # Stats listen stats bind *:9000 mode http stats enable stats refresh 30 stats uri /haproxy/