diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index 59b692ec..c992fbc8 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -86,7 +86,7 @@ DEFAULT_CONFIG = { 'PROXY_AUTH_HEADER': 'X-Auth-Email', 'PROXY_AUTH_CREATE': False, 'SUBNET': '192.168.203.0/24', - 'SUBNET6': None + 'SUBNET6': None, } class ConfigManager: @@ -96,7 +96,7 @@ class ConfigManager: DB_TEMPLATES = { 'sqlite': 'sqlite:////{SQLITE_DATABASE_FILE}', 'postgresql': 'postgresql://{DB_USER}:{DB_PW}@{DB_HOST}/{DB_NAME}', - 'mysql': 'mysql+mysqlconnector://{DB_USER}:{DB_PW}@{DB_HOST}/{DB_NAME}' + 'mysql': 'mysql+mysqlconnector://{DB_USER}:{DB_PW}@{DB_HOST}/{DB_NAME}', } def __init__(self): diff --git a/core/postfix/conf/main.cf b/core/postfix/conf/main.cf index 37fa70d0..0f6fd392 100644 --- a/core/postfix/conf/main.cf +++ b/core/postfix/conf/main.cf @@ -14,7 +14,7 @@ queue_directory = /queue message_size_limit = {{ MESSAGE_SIZE_LIMIT }} # Relayed networks -mynetworks = 127.0.0.1/32 [::1]/128 {{ SUBNET }} {% if RELAYNETS %}{{ RELAYNETS.split(",") | join(' ') }}{% endif %} +mynetworks = 127.0.0.1/32 [::1]/128 {{ SUBNET }} {% if SUBNET6 %}{{ "[{}]/{}".format(*SUBNET6.split("/")) }}{% endif %} {% if RELAYNETS %}{{ RELAYNETS.split(",") | join(" ") }}{% endif %} # Empty alias list to override the configuration variable and disable NIS alias_maps = @@ -121,7 +121,7 @@ smtpd_relay_restrictions = unverified_recipient_reject_reason = Address lookup failure -smtpd_authorized_xclient_hosts={{ SUBNET}}{% if SUBNET6 %},[{{ SUBNET6 }}]{% endif %} +smtpd_authorized_xclient_hosts={{ SUBNET }}{% if SUBNET6 %},[{{ SUBNET6 }}]{% endif %} ############### # Milter diff --git a/core/rspamd/conf/worker-controller.inc b/core/rspamd/conf/worker-controller.inc index a720c3df..d1bb251d 100644 --- a/core/rspamd/conf/worker-controller.inc +++ b/core/rspamd/conf/worker-controller.inc @@ -2,3 +2,6 @@ type = "controller"; bind_socket = "*:11334"; password = "mailu"; secure_ip = "{{ SUBNET }}"; +{%- if SUBNET6 %} +secure_ip = "{{ SUBNET6 }}"; +{%- endif %}