mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-18 03:21:36 +02:00
Merge #2808
2808: Ensure SCAN_MACROS works r=mergify[bot] a=nextgens ## What type of PR? bug-fix ## What does this PR do? Ensure SCAN_MACROS works ### Related issue(s) - closes #2805 ## Prerequisites 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/workflow.html#changelog) entry file. Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
commit
ab7b01fa04
@ -1,4 +1,4 @@
|
||||
{% if SCAN_MACROS == 'True' %}
|
||||
{% if SCAN_MACROS %}
|
||||
OLETOOLS_MACRO_MRAPTOR {
|
||||
expression = "(OLETOOLS_A & OLETOOLS_W) | (OLETOOLS_A & OLETOOLS_X) | (OLETOOLS_W & OLETOOLS_X)";
|
||||
message = "Rejected (malicious macro - mraptor)";
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% if SCAN_MACROS == 'True' %}
|
||||
{% if SCAN_MACROS %}
|
||||
oletools {
|
||||
# default olefy settings
|
||||
servers = "{{ OLETOOLS_ADDRESS }}:11343"
|
||||
|
@ -1,5 +1,4 @@
|
||||
|
||||
{% if SCAN_MACROS == 'True' %}
|
||||
{% if SCAN_MACROS %}
|
||||
# local.d/external_services_group.conf
|
||||
|
||||
description = "Oletools content rules";
|
||||
|
@ -9,13 +9,13 @@ import sys
|
||||
import time
|
||||
from socrate import system,conf
|
||||
|
||||
system.set_env()
|
||||
env = system.set_env()
|
||||
|
||||
# Actual startup script
|
||||
|
||||
config_files = []
|
||||
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, env, os.path.join("/etc/rspamd/local.d", os.path.basename(rspamd_file)))
|
||||
config_files.append(os.path.basename(rspamd_file))
|
||||
|
||||
for override_file in glob.glob("/overrides/*"):
|
||||
@ -23,7 +23,7 @@ for override_file in glob.glob("/overrides/*"):
|
||||
shutil.copyfile(override_file, os.path.join("/etc/rspamd/local.d", os.path.basename(override_file)))
|
||||
|
||||
# Admin may not be up just yet
|
||||
healthcheck = f'http://{os.environ["ADMIN_ADDRESS"]}/internal/rspamd/local_domains'
|
||||
healthcheck = f'http://{env["ADMIN_ADDRESS"]}/internal/rspamd/local_domains'
|
||||
while True:
|
||||
time.sleep(1)
|
||||
try:
|
||||
|
1
towncrier/newsfragments/2805.bugfix
Normal file
1
towncrier/newsfragments/2805.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix SCAN_MACROS: OLETOOLS wasn't always enabled/disabled like it should have been
|
Loading…
x
Reference in New Issue
Block a user