1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

make ANTIVIRUS_ADDRESS consistent with #940

This commit is contained in:
Tim Möhlmann 2019-08-22 13:08:43 +03:00
parent 5b07da7f7c
commit 05ea4474e7
No known key found for this signature in database
GPG Key ID: 8677988D8072E8DE
5 changed files with 9 additions and 6 deletions

View File

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

View File

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

View File

@ -24,6 +24,7 @@ def start_podop():
os.environ["FRONT_ADDRESS"] = system.resolve_address(os.environ.get("HOST_FRONT", "front"))
os.environ["REDIS_ADDRESS"] = system.resolve_address(os.environ.get("HOST_REDIS", "redis"))
os.environ["ADMIN_ADDRESS"] = system.resolve_address(os.environ.get("HOST_ADMIN", "admin"))
os.environ["ANTISPAM_ADDRESS"] = system.resolve_address(os.environ.get("HOST_ANTISPAM", "antispam:11334"))
if os.environ["WEBMAIL"] != "none":
os.environ["WEBMAIL_ADDRESS"] = system.resolve_address(os.environ.get("HOST_WEBMAIL", "webmail"))

View File

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

View File

@ -14,7 +14,9 @@ os.environ["FRONT_ADDRESS"] = system.resolve_address(os.environ.get("HOST_FRONT"
if "HOST_REDIS" not in os.environ:
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"))
if os.environ.get("ANTIVIRUS") == 'clamav':
os.environ["ANTIVIRUS_ADDRESS"] = system.resolve_address(os.environ.get("HOST_ANTIVIRUS", "antivirus:3310"))
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)))