change piep for replaces
This commit is contained in:
parent
2f7feb216d
commit
41618bf385
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ class SmtpdWatcher:
|
|||
def _read_banned_ips(self):
|
||||
ips = {}
|
||||
result = subprocess.run(
|
||||
['/usr/bin/fail2ban-client', 'get', 'postfix', 'banned', '|', 'tr', '-d', '"][\',"'],
|
||||
['/usr/bin/fail2ban-client', 'get', 'postfix', 'banned'],
|
||||
encoding='utf-8',
|
||||
check=True,
|
||||
capture_output=True,
|
||||
|
@ -60,7 +60,7 @@ class SmtpdWatcher:
|
|||
result.returncode,
|
||||
result.stderr,
|
||||
)
|
||||
ips['postfix'] = result.stdout.split(' ')
|
||||
ips['postfix'] = result.stdout.replace("'", '').replace(',', '').replace(']', '').replace('[', '').split(' ')
|
||||
self._log.debug(
|
||||
"Banned IPs in postfix jail: %s",
|
||||
ips['postfix']
|
||||
|
|
Loading…
Reference in a new issue