mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
testComplexMailActionMultiLog: better echo mock-up replacement for "...) | mail -s ..."
This commit is contained in:
parent
99344d28c8
commit
db16b4c22a
1 changed files with 1 additions and 1 deletions
|
|
@ -1748,7 +1748,7 @@ class ServerConfigReaderTests(LogCaptureTestCase):
|
|||
def _executeMailCmd(self, realCmd, timeout=60):
|
||||
# replace pipe to mail with pipe to cat:
|
||||
realCmd = re.sub(r'\)\s*\|\s*mail\b([^\n]*)',
|
||||
r' echo mail \1 ) | cat', realCmd)
|
||||
r') | cat; printf "\\n... | "; echo mail \1', realCmd)
|
||||
# replace abuse retrieving (possible no-network), just replace first occurrence of 'dig...':
|
||||
realCmd = re.sub(r'\bADDRESSES=\$\(dig\s[^\n]+',
|
||||
lambda m: 'ADDRESSES="abuse-1@abuse-test-server, abuse-2@abuse-test-server"',
|
||||
|
|
|
|||
Loading…
Reference in a new issue