mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-12 22:44:32 +00:00
36 lines
1.1 KiB
INI
36 lines
1.1 KiB
INI
|
# This is a test configuration. It listens on port 8025, waits for an incoming
|
||
|
# connection, and applies the following rules :
|
||
|
# - if the address is in the white list, then accept it and forward the
|
||
|
# connection to the server (local port 25)
|
||
|
# - if the address is in the black list, then immediately drop it
|
||
|
# - otherwise, wait up to 3 seconds. If the client talks during this time,
|
||
|
# drop the connection.
|
||
|
# - then accept the connection if it passes all the tests.
|
||
|
#
|
||
|
# Note that the rules are evaluated at every new chunk of data read, and at
|
||
|
# delay expiration. Rules which apply to incomplete data don't match as long
|
||
|
# as the timer has not expired.
|
||
|
|
||
|
listen block-fake-mailers
|
||
|
log 127.0.0.1:514 local0
|
||
|
option tcplog
|
||
|
|
||
|
mode tcp
|
||
|
bind :8025
|
||
|
timeout client 6s
|
||
|
timeout server 6s
|
||
|
timeout connect 6s
|
||
|
|
||
|
tcp-request inspect-delay 4s
|
||
|
|
||
|
acl white_list src 127.0.0.2
|
||
|
acl black_list src 127.0.0.3
|
||
|
acl talkative req_len gt 0
|
||
|
|
||
|
tcp-request content accept if white_list
|
||
|
tcp-request content reject if black_list
|
||
|
tcp-request content reject if talkative
|
||
|
|
||
|
balance roundrobin
|
||
|
server mail 127.0.0.1:25
|