Updated script attached.
Will now automatically add the IP to the windows firewall, if the failed login attempts reaches 20 or more per day
(can be changed in the top of the script)
You need a separate log file for “SMTP Receiving” Not sure if it needs to be set to Protocol Logging, but mine is.
Log file rotation set to Daily, so it rotates at midnight
I set this to run as a scheduled task, at 23:30 every day.
change the file extension to .ps1, it also needs to run elevated (as administrator)
SMTP Receiving check.txt (4.9 KB)