Open mathieumd opened 7 years ago
AFAIK, the specs of mails sent by Fail2ban when it starts are handled by action.d/{sendmail,mail}-common.conf (which one is used depends on mta value in jail.local).
action.d/{sendmail,mail}-common.conf
mta
jail.local
So in order to configure this, this role could simply add a task like this:
- name: set email sender address ini_file: dest: "/etc/fail2ban/action.d/{{fail2ban_mta}}-common.local" section: Init option: "{{item.k}}" value: "{{item.v}}" with_items: - { k: "dest", v: "{{fail2ban_destemail}}" } - { k: "sender", v: "{{fail2ban_sender}}" } - { k: "sendername", v: "{{fail2ban_sendername}}" } notify: restart fail2ban
I would like that! at least until the underlying problem in Fail2ban is fixed?
AFAIK, the specs of mails sent by Fail2ban when it starts are handled by
action.d/{sendmail,mail}-common.conf
(which one is used depends onmta
value injail.local
).So in order to configure this, this role could simply add a task like this: