Troubles with AND in acl


What have I done wrong here below?

As I cannot see what I should have done different, but sudo haproxy -c -f /etc/haproxy/haproxy01.cfg gives the following errors

error detected while parsing ACL ‘XMail_EAS’ : unknown fetch method ‘if’ in ACL expression ‘if’.

error detected while parsing an ‘http-request track-sc1’ condition : unknown fetch method ‘XMail_EAS’ in ACL expression ‘XMail_EAS’.

I have tried with { } around but that did not help


bind ssl crt /etc/haproxy/crt/mail_domain_com.pem alpn h2,http/1.1

acl XMail hdr(host) -i

http-request redirect scheme https code 301 if !{ ssl_fc }

acl XMail_EAS if XMail AND {url_beg -i /microsoft-server-activesync}

http-request track-sc1 src table Table_SRC_XMail_EAS_L4 if { XMail_EAS } { status 401 } { status 403 }

http-request tarpit deny_status 429 if { XMail_EAS} { sc_http_req_rate(1) gt 10 }



Doublepost on the ML, here’s your answer: