Fail2ban MTA = Jail Config中的Postfix设置给出错误

/etc/fail2ban/jail.local ,当我将MTA设置为Postfix时,Fail2Ban显示错误,无法启动。

 [DEFAULT] ignoreip = 127.0.0.1/8 bantime = 1800 maxretry = 4 destemail = [email protected] mta = postfix action = %(action_mwl)s 

错误:

 WARNING 'findtime' not defined in 'ssh'. Using default value ERROR /etc/fail2ban/action.d/postfix-whois-lines.conf and /etc/fail2ban/action.d/postfix-whois-lines.local do not exist ERROR Error in action definition postfix-whois-lines[name=ssh, dest="[email protected]", logpath=/var/log/auth.log, chain="INPUT"] ERROR Errors in jail 'ssh'. Skipping... ['set', 'loglevel', 3] ['set', 'logtarget', '/var/log/fail2ban.log'] 

错误指向其他地方,但是当我注释掉mta=postfix它的作品。

我已经安装了Postfix作为我的MTA(在Debian 7),我想我应该改变默认的sendmail到这个设置的postfix 。 我错了吗?

看看我的/etc/fail2ban/jail.local有这个评论:

 Since 0.8.1 upstream fail2ban uses sendmail MTA for the mailing. Change mta configuration parameter to mail if you want to revert to conventional 'mail' 

基于这个和你发布的错误,似乎你只能指定sendmailmail

mta设置为sendmail时,您是否收到来自fail2ban的电子邮件?

好的,挖掘一个旧的线程,但这是我得到后缀与Fail2ban的工作:

在/etc/fail2ban/action.d/我复制并重命名这个文件,通过改变所有的sendmail到后缀Works现在罚款:

例如cp sendmail-buffered.conf postfix-buffered.conf

所有在这个文件夹内的其他sendmail conf文件相同….

然后重新启动fail2ban服务 –