add failed IMAP login script
This commit is contained in:
parent
635ba3e91b
commit
2ab2381680
1 changed files with 9 additions and 0 deletions
9
mail_failed_login.sh
Executable file
9
mail_failed_login.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# Author: Oliver Ladner <oli@lugh.ch>
|
||||
# License: LGPL
|
||||
#
|
||||
# Displays a summary of failed IMAP login attempts by country
|
||||
|
||||
postfix_logfile='/var/log/mail.log'
|
||||
|
||||
for ip in $(grep 'auth failed' $postfix_logfile | awk {'print $17'} | sed 's/,//' | awk -F'=' {'print $2'} | sort -n | uniq); do geoiplookup $ip; done | sort | uniq -c | sort -n | tail -10
|
||||
Loading…
Add table
Add a link
Reference in a new issue