====================================================
[DEFAULT]maxretry = 5
====================================================
然后将/etc/fail2ban/filter.d/postfix.conf的内容修改为如下:
增加一个新的匹配规则拦截扫描//2015-10-12
warning: unknown\[<HOST>\]: SASL LOGIN authentication failed:
====================================================
[Definition]
failregex = : warning: [-._\w]+\[<HOST>\]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed$
warning: unknown\[<HOST>\]: SASL LOGIN authentication failed:
LOGIN FAILED, .*, ip=\[<HOST>\]$
warning: (.*)\[<HOST>\]: SASL LOGIN authentication failed:
error,relay=<HOST>,.*550 User unknown
reject: RCPT from (.*)\[<HOST>\]: 550
reject: RCPT from (.*)\[<HOST>\]: 554
reject: RCPT from (.*)\[<HOST>\]: 554
reject: RCPT from (.*)\[<HOST>\]: 504
ignoreregex =
====================================================
最后执行service fail2ban restart重启,搞定
本文由山坛兄弟原创或编辑,转载请保留链接【利用fail2ban拦截别人猜解邮箱密码】http://www.030904.net/email/187.html 上一篇: Nginx在CDN加速之后,获取用户真实IP做并发访问限制的方法