remove pipe

This commit is contained in:
Antonio J. Delgado 2025-01-31 16:53:18 +02:00
parent 3f24a4fd72
commit 458418c1ec

View file

@ -66,12 +66,12 @@ class SmtpdWatcher:
ips['postfix']
)
result = subprocess.run(
['/usr/bin/fail2ban-client', 'get', 'postfix-sasl', 'banned', '|', 'tr', '-d', '"][\',"'],
['/usr/bin/fail2ban-client', 'get', 'postfix-sasl', 'banned'],
encoding='utf-8',
check=True,
capture_output=True,
)
ips['postfix-sasl'] = result.stdout.split(' ')
ips['postfix-sasl'] = result.stdout.replace("'", '').replace(',', '').replace(']', '').replace('[', '').split(' ')
self._log.debug(
"Banned IPs in postfix-sasl jail: %s",
ips['postfix-sasl']