wrapper to force fail2bans for dodgy CONNECT froms that are more than 100 times - not sure I use this anymore

This commit is contained in:
2025-08-16 10:32:51 +10:00
parent c86cd4a04d
commit 49afe317a0

5
ban-mail-abusers Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
for i in `docker logs mail | grep "CONNECT from" | awk -F'[' '{print $3}' | cut -f1 -d']' | sort | uniq -c | sort -n | awk '{ if ( $1 > 100) print $2 }'`; do
echo docker exec -it mail fail2ban ban $i;
done