1 |
On Mon, Sep 26, 2011 at 9:45 PM, <covici@××××××××××.com> wrote: |
2 |
> I have fail2ban set up and it works quite well, except for the fact that |
3 |
> whenever it sends me an Email, it always sends two copies. Every night |
4 |
> when the logs rotate, it does this twice, once when t stops and once |
5 |
> when it restarts, and when it bans an ip it also sends two emails saying |
6 |
> so. |
7 |
> |
8 |
> any ideas as to why this is so and how to fix? |
9 |
> |
10 |
> Thanks in advance for any sugggestions. |
11 |
|
12 |
The emails when the service is stopped and started can be disabled in |
13 |
/etc/fail2ban/action.d/mail.conf (comment out the actionstart and |
14 |
actionstop sections). |
15 |
|
16 |
If you get multiple emails when someone is banned, it sounds like you |
17 |
have more than one rule enabled that is being triggered by the same |
18 |
event. For example, I think in the default jail.conf there's an ssh |
19 |
rule that bans in the firewall as well as an ssh rule that writes to |
20 |
hosts.deny. |
21 |
|
22 |
I disabled all of the email alerts from fail2ban because I was getting |
23 |
dozens up to hundreds of them per day, it seemed to be functioning |
24 |
properly, and I was basically flooding my inbox. :) |