Discussion:
Auto Blacklist
(too old to reply)
t***@gmail.com
2020-03-15 10:45:47 UTC
Permalink
Hadn't found any quick-wins in respect to locating a pre-rolled solution to dynamically generate blacklists in Postfix. So I scripted 16 lines of bash which captures IPs from /var/log/maillog and pre-pends the IPs with "REJECT" after each. Net result is a rolling block list created every 90 seconds.

Anyhoo, the full script can be cloned from Github which automagically configures a SystemD Service & Timer to continuously execute the auto blacklist script. Tested and known to work correctly on RHEL 8 with Postfix 3.3.1, but should work on any combination of Linux & Postfix:

https://github.com/f1linux/postfix-autoBlacklisting

Should be very tweakable to other use-cases banning bad behaviour on a Postfix server. Figured it was worth sharing to save folks the effort of solving the same problem. -Terrence
Victor d'Agostino
2020-03-16 16:06:33 UTC
Permalink
https://www.google.com/search?client=firefox-b-d&q=fail2ban+postfix
Continue reading on narkive:
Loading...