You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-07-01 00:44:57 +02:00
Merge #1211
1211: Split HOST_ANTISPAM in HOST_ANTISPAM_MILTER and HOST_ANTISPAM_WEBUI r=mergify[bot] a=micw ## What type of PR? bug-fix ## What does this PR do? Fixes #1190 by separating HOST_ANTISPAM into HOST_ANTISPAM_MILTER and HOST_ANTISPAM_WEBUI ### Related issue(s) - closes #1190 - closes #1150 ## Prerequistes Before we can consider review and merge, please make sure the following list is done and checked. If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly - [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file. Co-authored-by: Michael Wyraz <michael@wyraz.de>
This commit is contained in:
@ -60,8 +60,6 @@ DEFAULT_CONFIG = {
|
||||
'HOST_SMTP': 'smtp',
|
||||
'HOST_AUTHSMTP': 'smtp',
|
||||
'HOST_ADMIN': 'admin',
|
||||
'ANTISPAM': 'none',
|
||||
'HOST_ANTISPAM': 'antispam:11334',
|
||||
'WEBMAIL': 'none',
|
||||
'HOST_WEBMAIL': 'webmail',
|
||||
'HOST_WEBDAV': 'webdav:5232',
|
||||
@ -99,8 +97,6 @@ class ConfigManager(dict):
|
||||
self.config["REDIS_ADDRESS"] = self.get_host_address("REDIS")
|
||||
if self.config["WEBMAIL"] != "none":
|
||||
self.config["WEBMAIL_ADDRESS"] = self.get_host_address("WEBMAIL")
|
||||
if self.config["ANTISPAM"] != "none":
|
||||
self.config["ANTISPAM_ADDRESS"] = self.get_host_address("ANTISPAM")
|
||||
|
||||
def __coerce_value(self, value):
|
||||
if isinstance(value, str) and value.lower() in ('true','yes'):
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
tee >(rspamc -h {{ ANTISPAM_ADDRESS }} -P mailu learn_ham /dev/stdin) \
|
||||
| rspamc -h {{ ANTISPAM_ADDRESS }} -P mailu -f 13 fuzzy_add /dev/stdin
|
||||
tee >(rspamc -h {{ ANTISPAM_WEBUI_ADDRESS }} -P mailu learn_ham /dev/stdin) \
|
||||
| rspamc -h {{ ANTISPAM_WEBUI_ADDRESS }} -P mailu -f 13 fuzzy_add /dev/stdin
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
tee >(rspamc -h {{ ANTISPAM_ADDRESS }} -P mailu learn_spam /dev/stdin) \
|
||||
>(rspamc -h {{ ANTISPAM_ADDRESS }} -P mailu -f 11 fuzzy_add /dev/stdin)
|
||||
tee >(rspamc -h {{ ANTISPAM_WEBUI_ADDRESS }} -P mailu learn_spam /dev/stdin) \
|
||||
>(rspamc -h {{ ANTISPAM_WEBUI_ADDRESS }} -P mailu -f 11 fuzzy_add /dev/stdin)
|
||||
|
@ -25,7 +25,7 @@ def start_podop():
|
||||
os.environ["FRONT_ADDRESS"] = system.get_host_address_from_environment("FRONT", "front")
|
||||
os.environ["REDIS_ADDRESS"] = system.get_host_address_from_environment("REDIS", "redis")
|
||||
os.environ["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", "admin")
|
||||
os.environ["ANTISPAM_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM", "antispam:11334")
|
||||
os.environ["ANTISPAM_WEBUI_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_WEBUI", "antispam:11334")
|
||||
if os.environ["WEBMAIL"] != "none":
|
||||
os.environ["WEBMAIL_ADDRESS"] = system.get_host_address_from_environment("WEBMAIL", "webmail")
|
||||
|
||||
|
@ -40,7 +40,7 @@ http {
|
||||
root /static;
|
||||
# Variables for proxifying
|
||||
set $admin {{ ADMIN_ADDRESS }};
|
||||
set $antispam {{ ANTISPAM_ADDRESS }};
|
||||
set $antispam {{ ANTISPAM_WEBUI_ADDRESS }};
|
||||
{% if WEBMAIL_ADDRESS %}
|
||||
set $webmail {{ WEBMAIL_ADDRESS }};
|
||||
{% endif %}
|
||||
|
@ -15,7 +15,7 @@ with open("/etc/resolv.conf") as handle:
|
||||
args["RESOLVER"] = content[content.index("nameserver") + 1]
|
||||
|
||||
args["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", "admin")
|
||||
args["ANTISPAM_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM", "antispam:11334")
|
||||
args["ANTISPAM_WEBUI_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_WEBUI", "antispam:11334")
|
||||
if args["WEBMAIL"] != "none":
|
||||
args["WEBMAIL_ADDRESS"] = system.get_host_address_from_environment("WEBMAIL", "webmail")
|
||||
if args["WEBDAV"] != "none":
|
||||
|
@ -112,7 +112,7 @@ unverified_recipient_reject_reason = Address lookup failure
|
||||
# Milter
|
||||
###############
|
||||
|
||||
smtpd_milters = inet:{{ ANTISPAM_ADDRESS }}
|
||||
smtpd_milters = inet:{{ ANTISPAM_MILTER_ADDRESS }}
|
||||
milter_protocol = 6
|
||||
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
|
||||
milter_default_action = tempfail
|
||||
|
@ -28,7 +28,7 @@ def start_podop():
|
||||
# Actual startup script
|
||||
os.environ["FRONT_ADDRESS"] = system.get_host_address_from_environment("FRONT", "front")
|
||||
os.environ["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", "admin")
|
||||
os.environ["ANTISPAM_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM", "antispam:11332")
|
||||
os.environ["ANTISPAM_MILTER_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_MILTER", "antispam:11332")
|
||||
os.environ["LMTP_ADDRESS"] = system.get_host_address_from_environment("LMTP", "imap:2525")
|
||||
|
||||
for postfix_file in glob.glob("/conf/*.cf"):
|
||||
|
@ -146,7 +146,8 @@ optional port number. Those variables are:
|
||||
- ``HOST_SMTP``: the container that is running the SMTP server (default: ``smtp``, port 25)
|
||||
- ``HOST_AUTHSMTP``: the container that is running the authenticated SMTP server for the webnmail (default: ``smtp``, port 10025)
|
||||
- ``HOST_ADMIN``: the container that is running the admin interface (default: ``admin``)
|
||||
- ``HOST_ANTISPAM``: the container that is running the antispam service (default: ``antispam:11334``)
|
||||
- ``HOST_ANTISPAM_MILTER``: the container that is running the antispam milter service (default: ``antispam:11332``)
|
||||
- ``HOST_ANTISPAM_WEBUI``: the container that is running the antispam webui service (default: ``antispam:11334``)
|
||||
- ``HOST_ANTIVIRUS``: the container that is running the antivirus service (default: ``antivirus:3310``)
|
||||
- ``HOST_WEBMAIL``: the container that is running the webmail (default: ``webmail``)
|
||||
- ``HOST_WEBDAV``: the container that is running the webdav server (default: ``webdav:5232``)
|
||||
|
@ -169,6 +169,7 @@
|
||||
HOST_WEBMAIL: "webmail.mailu-mailserver.svc.cluster.local"
|
||||
HOST_ADMIN: "admin.mailu-mailserver.svc.cluster.local"
|
||||
HOST_WEBDAV: "webdav.mailu-mailserver.svc.cluster.local:5232"
|
||||
HOST_ANTISPAM: "antispam.mailu-mailserver.svc.cluster.local:11332"
|
||||
HOST_ANTISPAM_MILTER: "antispam.mailu-mailserver.svc.cluster.local:11332"
|
||||
HOST_ANTISPAM_WEBUI: "antispam.mailu-mailserver.svc.cluster.local:11334"
|
||||
HOST_ANTIVIRUS: "antivirus.mailu-mailserver.svc.cluster.local:3310"
|
||||
HOST_REDIS: "redis.mailu-mailserver.svc.cluster.local"
|
||||
|
1
towncrier/newsfragments/1190.fix
Normal file
1
towncrier/newsfragments/1190.fix
Normal file
@ -0,0 +1 @@
|
||||
Separate HOST_ANTISPAM in HOST_ANTISPAM_MILTER and HOST_ANTISPAM_WEBUI because of different ports
|
Reference in New Issue
Block a user