<commit_before>
# Global settings
#=====================================================================
global
    log /dev/log    local0
    log /dev/log    local1 notice
    chroot /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    user haproxy
    group haproxy
    daemon

# Defaults settings
#=====================================================================
defaults
    log     global

    option  httplog
    option  dontlognull
    option  http-server-close
    option  forwardfor

    retries 3

    contimeout  5000
    clitimeout  50000
    srvtimeout  50000
    timeout     http-request    10s
    timeout     queue           1m
    timeout     connect         10s
    timeout     client          1m
    timeout     server          1m
    timeout     http-keep-alive 10s
    timeout     check           10s

    stats enable
    stats uri /haproxy?stats
    stats auth admin:admin
    
    errorfile 400 /etc/haproxy/errors/400.http
    errorfile 403 /etc/haproxy/errors/403.http
    errorfile 408 /etc/haproxy/errors/408.http
    errorfile 500 /etc/haproxy/errors/500.http
    errorfile 502 /etc/haproxy/errors/502.http
    errorfile 503 /etc/haproxy/errors/503.http
    errorfile 504 /etc/haproxy/errors/504.http

# Mail Server -- SMTP 25 settings
#=====================================================================
frontend smtp
    bind                0.0.0.0:25
    mode                tcp
    no option           http-server-close
    timeout             client 1m
    option              tcplog
    default_backend     mailserver_smtp

# Mail Server -- IMAP 143 settings
#=====================================================================
frontend smtp
    bind                0.0.0.0:143
    mode                tcp
    timeout             client 1m
    option              tcplog
    default_backend     mailserver_imap


# Main 80 settings
#=====================================================================
frontend  main *:80<commit_msg>HAproxy for mail server<commit_after>
# Global settings
#=====================================================================
global
    log /dev/log    local0
    log /dev/log    local1 notice
    chroot /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    user haproxy
    group haproxy
    daemon

# Defaults settings
#=====================================================================
defaults
    log     global

    option  httplog
    option  dontlognull
    option  http-server-close
    option  forwardfor

    retries 3

    contimeout  5000
    clitimeout  50000
    srvtimeout  50000
    timeout     http-request    10s
    timeout     queue           1m
    timeout     connect         10s
    timeout     client          1m
    timeout     server          1m
    timeout     http-keep-alive 10s
    timeout     check           10s

    stats enable
    stats uri /haproxy?stats
    stats auth admin:admin
    
    errorfile 400 /etc/haproxy/errors/400.http
    errorfile 403 /etc/haproxy/errors/403.http
    errorfile 408 /etc/haproxy/errors/408.http
    errorfile 500 /etc/haproxy/errors/500.http
    errorfile 502 /etc/haproxy/errors/502.http
    errorfile 503 /etc/haproxy/errors/503.http
    errorfile 504 /etc/haproxy/errors/504.http

# Mail Server -- SMTP 25 settings
#=====================================================================
frontend smtp
    bind                0.0.0.0:25
    mode                tcp
    no option           http-server-close
    timeout             client 1m
    option              tcplog

    default_backend     mailserver_smtp

# # Mail Server -- SMTP SSL 465 settings
# #=====================================================================
# frontend smtp
#     bind                0.0.0.0:465
#     mode                tcp
#     no option           http-server-close
#     timeout             client 1m
#     option              tcplog
#
#     default_backend     mailserver_smtp

# Mail Server -- IMAP 143 settings
#=====================================================================
frontend smtp
    bind                0.0.0.0:143
    mode                tcp
    timeout             client 1m
    option              tcplog

    default_backend     mailserver_imap

# # Mail Server -- IMAP SSL 993 settings
# #=====================================================================
# frontend smtp
#     bind                0.0.0.0:993
#     mode                tcp
#     timeout             client 1m
#     option              tcplog
#
#     # TODO SSL Cert
#
#     default_backend     mailserver_imap


# Main 80 settings
#=====================================================================
frontend  main *:80
{'fraction_non_alphanumeric': 0.2214132762312634, 'fraction_numerical': 0.044967880085653104, 'mean_word_length': 2.0649606299212597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7614885', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1215, 'n_words': 318}