On Tue, 2 Jul 2019 at 09:08, MI <[email protected]> wrote:

> Well, apparently it's not possible.
>
> "fail2ban-client reload" does everything (unban, re-ban, etc) for every
> jail, which is what I want to avoid.
>
> "fail2ban-client reload $jail" does the same, except you would have to do
> it for every jail
>
> Then I tried delaction / addaction on every jail with this beautiful ( :-)
> ) one-liner (broken up here to make it readable for the curious)  :
>
>     fail2ban-client status \
>     | perl -nle '/Jail list:\s+(.*)/ || next; @jails=split /, /, $1; print
> join("\n", @jails)' \
>     | while read jail; do
>         echo $jail
>         fail2ban-client set $jail delaction sendmail-whois-lines;
>         fail2ban-client set $jail addaction sendmail-whois-lines;
>         echo;
>       done
>
> Unfortunately, that didn't work, even though "fail2ban-client -d" showed
> the new action in every jail. I just stopped getting mails until I did a
> full reload.
>
> Maybe it should be a feature request for a future version...
>

'fail2ban-client reload' (and thence 'systemctl reload fail2ban') does
indeed work the way you want with fail2ban 0.10 and later, so your request
is granted already.
_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to