make `ANTIVIRUS_ADDRESS` consistent with #940

master
Tim Möhlmann 5 years ago
parent 5b07da7f7c
commit 05ea4474e7
No known key found for this signature in database
GPG Key ID: 8677988D8072E8DE

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

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

@ -24,6 +24,7 @@ def start_podop():
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"))
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["ADMIN_ADDRESS"] = system.resolve_address(os.environ.get("HOST_ADMIN", "admin")) 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": if os.environ["WEBMAIL"] != "none":
os.environ["WEBMAIL_ADDRESS"] = system.resolve_address(os.environ.get("HOST_WEBMAIL", "webmail")) os.environ["WEBMAIL_ADDRESS"] = system.resolve_address(os.environ.get("HOST_WEBMAIL", "webmail"))

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

@ -14,7 +14,9 @@ os.environ["FRONT_ADDRESS"] = system.resolve_address(os.environ.get("HOST_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"))
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/*"): 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