Do not print a log warning for IPs in local mailcow network to prevent watchdog spam in the log
This commit is contained in:
parent
ed9b239af7
commit
af5f5cc9e2
|
@ -342,6 +342,8 @@ def watch():
|
||||||
logInfo('Check if your regular expressions are up to date: https://github.com/mailcow/mailcow-dockerized/issues/5125')
|
logInfo('Check if your regular expressions are up to date: https://github.com/mailcow/mailcow-dockerized/issues/5125')
|
||||||
continue
|
continue
|
||||||
ip = ipaddress.ip_address(addr)
|
ip = ipaddress.ip_address(addr)
|
||||||
|
if ip in ipaddress.ip_network(os.getenv('IPV4_NETWORK', '172.22.1') + '.0/24') or ip in ipaddress.ip_network(os.getenv('IPV6_NETWORK', 'fd4d:6169:6c63:6f77::/64')):
|
||||||
|
continue
|
||||||
if ip.is_private or ip.is_loopback:
|
if ip.is_private or ip.is_loopback:
|
||||||
logWarn('%s matched rule id: %s, log line: %s´, but was ignored as it is a private or loopback IP' % (addr, rule_id, item['data']))
|
logWarn('%s matched rule id: %s, log line: %s´, but was ignored as it is a private or loopback IP' % (addr, rule_id, item['data']))
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue