How to give timeout for SMTP health check in backend section

I have added option smtpchk in the backend section. It is checking at every second. I don’t want to do that at every second. I want to run a health check every 10 seconds. How can I do that?

Eg:
timeout check 10s

Is the above configuration option correct?

No, you need to configure the health check interval, not the timeout:

https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#5.2-inter

@lukastribus Is this correct way to add these into backend section for SMTP health check?

Eg:

backend smtp-backend-mail
    mode tcp
    option smtpchk
    max-spread-checks 10000

    balance source
    hash-type consistent   
    stick-table type ip size 20k
    stick on src

    server IP:25 check on-marked-down shutdown-sessions

No, use the configuration I suggested, which is the inter keyword.

server IP:25 check inter 10s on-marked-down shutdown-sessions

Thanks for the reply. @lukastribus Will this have any side effects? This only affects the health check right?

The one and only use-case for this option is to configure the interval between one health check and another health check, as per the documentation:

The “inter” parameter sets the interval between two consecutive health checks to milliseconds.

Unless you modify other unrelated parameters (like timeout check), there is not side effect.

Okay Thanks