Exim4, grep the log files

From Andreida
Revision as of 22:50, 6 June 2023 by Andreas (talk | contribs) (Created page with "=== IPs with failed login === List all IPs whit a failed login and give a count of how often they tried (maxed by deleted old log files) zgrep -o 'failed for (\[.*\])' /var/l...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

IPs with failed login

List all IPs whit a failed login and give a count of how often they tried (maxed by deleted old log files)

zgrep -o 'failed for (\[.*\])' /var/log/exim4/rejectlog.* | grep -o '\[.*\]' | sed 's/^.//' | sed 's/.$//' | sort | uniq -c | sort -n