Quarantine regex matches headers case insensitive
This commit is contained in:
@@ -35,7 +35,7 @@ The following configuration options are mandatory in the global section:
|
|||||||
### Quarantine sections
|
### Quarantine sections
|
||||||
The following configuration options are mandatory in each quarantine section:
|
The following configuration options are mandatory in each quarantine section:
|
||||||
* **regex**
|
* **regex**
|
||||||
Regular expression to filter e-mail headers.
|
Case insensitive regular expression to filter e-mail headers.
|
||||||
* **quarantine_type**
|
* **quarantine_type**
|
||||||
One of the quarantine-types described below.
|
One of the quarantine-types described below.
|
||||||
* **action**
|
* **action**
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ preferred_quarantine_action = last
|
|||||||
ignore_hosts = 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
ignore_hosts = 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
||||||
|
|
||||||
# Option: regex
|
# Option: regex
|
||||||
# Notes: Set the regular expression to match against email headers.
|
# Notes: Set the case insensitive regular expression to match against email headers.
|
||||||
# If the regex matches any of the email headers, the email
|
# If the regex matches any of the email headers, the email
|
||||||
# will be processed by this quarantine.
|
# will be processed by this quarantine.
|
||||||
# Values: [ REGEX ]
|
# Values: [ REGEX ]
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ def generate_milter_config(configtest=False, config_files=[]):
|
|||||||
|
|
||||||
# pre-compile regex
|
# pre-compile regex
|
||||||
logger.debug("{}: compiling regex '{}'".format(quarantine_name, config["regex"]))
|
logger.debug("{}: compiling regex '{}'".format(quarantine_name, config["regex"]))
|
||||||
config["regex_compiled"] = re.compile(config["regex"], re.MULTILINE + re.DOTALL)
|
config["regex_compiled"] = re.compile(config["regex"], re.MULTILINE + re.DOTALL + re.IGNORECASE)
|
||||||
|
|
||||||
# create quarantine instance
|
# create quarantine instance
|
||||||
quarantine_type = config["quarantine_type"].lower()
|
quarantine_type = config["quarantine_type"].lower()
|
||||||
|
|||||||
Reference in New Issue
Block a user