Thanks Mr. Nelson,
Was able to figure it out =)

When I originally setup the email account filters, I had forgotten that
I made a custom named jail, "posfix-auth" which had non-default action
attached to it. I added the default action, which send an email. 

I'll see how it works.

The above revelation also helped me to set default settings to those I
wanted, without having always having to reset them on a restart =)

*fingers crossed*

-----Original Message-----
From: Dave Nelson <[email protected]>
To: [email protected]
Subject: Re: [Fail2ban-users] email notifications from all jails
Date: Sat, 04 May 2019 15:27:58 +0300

Hi, let me try to give you a partial answer. If you are wanting mail 
alerts from some jails but not others, it's possible but I can't 
reliably give you that explanation right now.

Apart from that, you should open jail.conf and then re-save it as 
jail.local. All your customizations should go in fail2ban.local.
In there look for:

destemail = root@localhost

and change it to your desired email address for the notifications. 
You'll need to have sendmail or postfix installed and working.
sendmail 
is the easiest, and is the default:

mta = sendmail

Then you need to configure the default action when a jail is triggered:

action = %(action_mwl)s

will send you an email with lines from your logs.

Beware, those email alerts arrive when you start and stop fail2ban and 
every time a jail is triggered. They can become very frequent if you 
have a lot of hits from bad guys, or a large number of jails activated.

HTH and good luck,
Dave

On 2019-05-04 11:18, Esteban L via Fail2ban-users wrote:
> Hello,
> 
> I am able to receive these from "dovecot" banishments.
> 
> However, I would like to receive the warning for "postfix-auth" jail
> malfeasance.
> 
> Which file would I have to edit to get this action. I have searched
> around the places I would expect, like:
> jail.conf, jail.local, fail2ban.conf but usually it says not to edit
> those.
> 
> Also, checked the mail.conf and mail-whois.conf, as well as some
> sendmail.conf files, but nothing stands out.
> 
> Can anyone throw me a bone? I assume it must be easy for smoeone =)
> 
> Thanks
> 
> 
> _______________________________________________
> Fail2ban-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fail2ban-users


_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users


_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to