mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-10-29 17:22:20 +00:00
Merge #3299
3299: fix warnings r=mergify[bot] a=nextgens ## What type of PR? bug-fix ## What does this PR do? fix warnings ### Related issue(s) - close #3297 ## 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 - [ ] 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:
@@ -14,7 +14,7 @@ def postfix_dane_map(domain_name):
|
||||
|
||||
@internal.route("/postfix/domain/<domain_name>")
|
||||
def postfix_mailbox_domain(domain_name):
|
||||
if re.match("^\[.*\]$", domain_name):
|
||||
if re.match(r'^\[.*\]$', domain_name):
|
||||
return flask.abort(404)
|
||||
domain = models.Domain.query.get(domain_name) or \
|
||||
models.Alternative.query.get(domain_name) or \
|
||||
@@ -39,7 +39,7 @@ def postfix_alias_map(alias):
|
||||
|
||||
@internal.route("/postfix/transport/<path:email>")
|
||||
def postfix_transport(email):
|
||||
if email == '*' or re.match("(^|.*@)\[.*\]$", email):
|
||||
if email == '*' or re.match(r'(^|.*@)\[.*\]$', email):
|
||||
return flask.abort(404)
|
||||
_, domain_name = models.Email.resolve_domain(email)
|
||||
relay = models.Relay.query.get(domain_name) or flask.abort(404)
|
||||
|
||||
@@ -7,7 +7,7 @@ import flask_wtf
|
||||
import re
|
||||
import ipaddress
|
||||
|
||||
LOCALPART_REGEX = "^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$"
|
||||
LOCALPART_REGEX = r'^[a-zA-Z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&\'*+/=?^_`{|}~-]+)*$'
|
||||
|
||||
class DestinationField(fields.SelectMultipleField):
|
||||
""" Allow for multiple emails selection from current user choices and
|
||||
|
||||
@@ -33,7 +33,7 @@ class LogFilter(object):
|
||||
def __init__(self, stream, re_patterns):
|
||||
self.stream = stream
|
||||
if isinstance(re_patterns, list):
|
||||
self.pattern = re.compile('|'.join([f'(?:{pattern})' for pattern in re_patterns]))
|
||||
self.pattern = re.compile('|'.join([fr'(?:{pattern})' for pattern in re_patterns]))
|
||||
elif isinstance(re_patterns, str):
|
||||
self.pattern = re.compile(re_patterns)
|
||||
else:
|
||||
|
||||
@@ -104,9 +104,10 @@ http {
|
||||
|
||||
# Only enable HTTPS if TLS is enabled with no error
|
||||
{% if TLS_443 and not TLS_ERROR %}
|
||||
listen 443 ssl http2{% if PROXY_PROTOCOL_443 %} proxy_protocol{% endif %};
|
||||
listen 443 ssl{% if PROXY_PROTOCOL_443 %} proxy_protocol{% endif %};
|
||||
{% if SUBNET6 %}
|
||||
listen [::]:443 ssl http2{% if PROXY_PROTOCOL_443 %} proxy_protocol{% endif %};
|
||||
listen [::]:443 ssl{% if PROXY_PROTOCOL_443 %} proxy_protocol{% endif %};
|
||||
http2 on;
|
||||
{% endif %}
|
||||
|
||||
include /etc/nginx/tls.conf;
|
||||
|
||||
@@ -85,6 +85,8 @@ for item in args.get('PROXY_PROTOCOL', '').split(','):
|
||||
for p in PROTO_ALL_BUT_HTTP: args[f'PROXY_PROTOCOL_{p}']=True
|
||||
elif item == 'all':
|
||||
for p in PROTO_ALL: args[f'PROXY_PROTOCOL_{p}']=True
|
||||
elif item == '':
|
||||
pass
|
||||
else:
|
||||
log.error(f'Not sure what to do with {item} in PROXY_PROTOCOL ({args.get("PROXY_PROTOCOL")})')
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# WARNING: this file is being deprecated over the new setup utility, found at https://setup.mailu.io
|
||||
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# This file is used to test the mailu/docs website
|
||||
# Deployment files can be found on github.com/mailu/infra
|
||||
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
docs:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# This file is used to test the mailu/setup utility
|
||||
# Deployment files can be found on github.com/mailu/infra
|
||||
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
redis:
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
# Please read the documentation before attempting any change.
|
||||
# Generated for {{ flavor }} flavor
|
||||
|
||||
version: '2.2'
|
||||
|
||||
services:
|
||||
|
||||
# External dependencies
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Please read the documentation before attempting any change.
|
||||
# Generated for compose flavor
|
||||
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Please read the documentation before attempting any change.
|
||||
# Generated for compose flavor
|
||||
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Please read the documentation before attempting any change.
|
||||
# Generated for compose flavor
|
||||
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Please read the documentation before attempting any change.
|
||||
# Generated for compose flavor
|
||||
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Please read the documentation before attempting any change.
|
||||
# Generated for compose flavor
|
||||
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Please read the documentation before attempting any change.
|
||||
# Generated for compose flavor
|
||||
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user