1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-16 10:59:53 +02:00
Mailu/core/nginx/proxy.conf

64 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-04-20 15:36:17 +02:00
###############
# General
###############
log_path = /dev/stderr
2023-04-21 09:13:11 +02:00
auth_verbose=yes
mail_debug=yes
2023-04-21 10:29:28 +02:00
login_log_format_elements = user=<%u> method=%m rip=%r rport=%b lip=%l lport=%a mpid=%e %c
2023-04-20 15:36:17 +02:00
protocols = sieve
postmaster_address = {{ POSTMASTER }}@{{ DOMAIN }}
hostname = {{ HOSTNAMES.split(",")[0] }}
submission_host = {{ FRONT_ADDRESS }}
default_internal_user = dovecot
default_login_user = mail
default_internal_group = dovecot
haproxy_trusted_networks = {% if REAL_IP_FROM %}{% for from_ip in REAL_IP_FROM.split(',') %}{{ from_ip }} {% endfor %}{% endif %}
###############
# Authentication
###############
auth_username_chars =
auth_mechanisms = plain login
2023-04-21 08:59:42 +02:00
{%- if TLS %}
2023-04-20 15:36:17 +02:00
ssl = required
ssl_cert = <{{ TLS[0] }}
ssl_key = <{{ TLS[1] }}
2023-04-21 08:59:42 +02:00
{%- if TLS_FLAVOR in ['letsencrypt','mail-letsencrypt'] %}
2023-04-20 15:36:17 +02:00
ssl_alt_cert = <{{ TLS[2] }}
ssl_alt_key = <{{ TLS[3] }}
{% endif %}
# intermediate configuration
ssl_min_protocol = TLSv1.2
ssl_cipher_list = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ssl_prefer_server_ciphers = no
ssl_dh = </conf/dhparam.pem
{% else %}
disable_plaintext_auth = no
protocol sieve {
ssl = no
}
{% endif %}
passdb {
driver = lua
args = file=/etc/dovecot/login.lua blocking=yes
}
service auth-worker {
2023-04-21 08:59:42 +02:00
user = dovenull
group = dovenull
2023-04-20 15:36:17 +02:00
}
service managesieve-login {
executable = managesieve-login
inet_listener sieve {
port = 4190
2023-04-21 08:59:42 +02:00
{%- if PROXY_PROTOCOL in ['all', 'mail'] %}
2023-04-20 15:36:17 +02:00
haproxy = yes
{% endif %}
}
}