Fixed hardcoded antispam and antivirus host addresses

Fixes #978
master
Igor Rzegocki 6 years ago committed by Tim Möhlmann
parent 3e626b8500
commit 6f973a2e4b
No known key found for this signature in database
GPG Key ID: 8677988D8072E8DE

@ -15,6 +15,7 @@ v1.6.1 - unreleased
- Enhancement: Create an Authentication Token with IPv6 address restriction ([#829](https://github.com/Mailu/Mailu/issues/829)) - Enhancement: Create an Authentication Token with IPv6 address restriction ([#829](https://github.com/Mailu/Mailu/issues/829))
- Enhancement: Automatically create admin user on container startup if given appropriate environment variables - Enhancement: Automatically create admin user on container startup if given appropriate environment variables
- Enhancement: Missing wildcard option in alias flask command ([#869](https://github.com/Mailu/Mailu/issues/869)) - Enhancement: Missing wildcard option in alias flask command ([#869](https://github.com/Mailu/Mailu/issues/869))
- Enhancement: Fixed hardcoded antispam and antivirus host addresses ([#978](https://github.com/Mailu/Mailu/issues/978))
- Bug: Fix creating new fetched accounts - Bug: Fix creating new fetched accounts
- Bug: Fix poor performance if ANTIVIRUS is configured to none. - Bug: Fix poor performance if ANTIVIRUS is configured to none.
- Bug: Implement mailustart to resolve webmail in admin ([#716](https://github.com/Mailu/Mailu/issues/716)) - Bug: Implement mailustart to resolve webmail in admin ([#716](https://github.com/Mailu/Mailu/issues/716))

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
tee >(rspamc -h antispam:11334 -P mailu learn_ham /dev/stdin) \ tee >(rspamc -h ${HOST_ANTISPAM:-antispam:11334} -P mailu learn_ham /dev/stdin) \
| rspamc -h antispam:11334 -P mailu -f 13 fuzzy_add /dev/stdin | rspamc -h ${HOST_ANTISPAM:-antispam:11334} -P mailu -f 13 fuzzy_add /dev/stdin

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
tee >(rspamc -h antispam:11334 -P mailu learn_spam /dev/stdin) \ tee >(rspamc -h ${HOST_ANTISPAM:-antispam:11334} -P mailu learn_spam /dev/stdin) \
>(rspamc -h antispam:11334 -P mailu -f 11 fuzzy_add /dev/stdin) >(rspamc -h ${HOST_ANTISPAM:-antispam:11334} -P mailu -f 11 fuzzy_add /dev/stdin)

@ -147,6 +147,7 @@ optional port number. Those variables are:
- ``HOST_AUTHSMTP``: the container that is running the authenticated SMTP server for the webnmail (default: ``smtp``, port 10025) - ``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_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``: the container that is running the antispam 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_WEBMAIL``: the container that is running the webmail (default: ``webmail``)
- ``HOST_WEBDAV``: the container that is running the webdav server (default: ``webdav:5232``) - ``HOST_WEBDAV``: the container that is running the webdav server (default: ``webdav:5232``)
- ``HOST_REDIS``: the container that is running the redis daemon (default: ``redis``) - ``HOST_REDIS``: the container that is running the redis daemon (default: ``redis``)

@ -165,4 +165,5 @@
HOST_ADMIN: "admin.mailu-mailserver.svc.cluster.local" HOST_ADMIN: "admin.mailu-mailserver.svc.cluster.local"
HOST_WEBDAV: "webdav.mailu-mailserver.svc.cluster.local:5232" HOST_WEBDAV: "webdav.mailu-mailserver.svc.cluster.local:5232"
HOST_ANTISPAM: "antispam.mailu-mailserver.svc.cluster.local:11332" HOST_ANTISPAM: "antispam.mailu-mailserver.svc.cluster.local:11332"
HOST_ANTIVIRUS: "antivirus.mailu-mailserver.svc.cluster.local:3310"
HOST_REDIS: "redis.mailu-mailserver.svc.cluster.local" HOST_REDIS: "redis.mailu-mailserver.svc.cluster.local"

@ -3,6 +3,6 @@ clamav {
attachments_only = true; attachments_only = true;
symbol = "CLAM_VIRUS"; symbol = "CLAM_VIRUS";
type = "clamav"; type = "clamav";
servers = "antivirus:3310"; servers = "{{ HOST_ANTIVIRUS }}";
} }
{% endif %} {% endif %}

@ -9,11 +9,12 @@ from socrate import system, conf
log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING")) log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING"))
# Actual startup script # Actual startup script
os.environ["FRONT_ADDRESS"] = system.resolve_address(os.environ.get("HOST_FRONT", "front")) os.environ["FRONT_ADDRESS"] = system.resolve_address(os.environ.get("HOST_FRONT", "front"))
if "HOST_REDIS" not in os.environ: if "HOST_REDIS" not in os.environ:
os.environ["REDIS_ADDRESS"] = system.resolve_address(os.environ.get("HOST_REDIS", "redis")) os.environ["REDIS_ADDRESS"] = system.resolve_address(os.environ.get("HOST_REDIS", "redis"))
os.environ["HOST_ANTIVIRUS"] = system.resolve_address(os.environ.get("HOST_ANTIVIRUS", "antivirus:3310"))
for rspamd_file in glob.glob("/conf/*"): for rspamd_file in glob.glob("/conf/*"):
conf.jinja(rspamd_file, os.environ, os.path.join("/etc/rspamd/local.d", os.path.basename(rspamd_file))) conf.jinja(rspamd_file, os.environ, os.path.join("/etc/rspamd/local.d", os.path.basename(rspamd_file)))

Loading…
Cancel
Save