diff options
| author | Antoine Ouvrard <antoine.ouvrard@zextras.fr> | 2023-03-09 16:44:05 +0100 |
|---|---|---|
| committer | Antoine Ouvrard <antoine.ouvrard@zextras.fr> | 2023-03-09 16:44:05 +0100 |
| commit | 38129c2455892386eb8c9171c90154192d5480ac (patch) | |
| tree | fe0a52f9a2763b7248460cc42601dc6923b8184a /ansible_tools/roles/set-fail2ban/templates/sendmail-common.conf.ubuntu.j2 | |
ajoute les archives
Diffstat (limited to 'ansible_tools/roles/set-fail2ban/templates/sendmail-common.conf.ubuntu.j2')
| -rw-r--r-- | ansible_tools/roles/set-fail2ban/templates/sendmail-common.conf.ubuntu.j2 | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/ansible_tools/roles/set-fail2ban/templates/sendmail-common.conf.ubuntu.j2 b/ansible_tools/roles/set-fail2ban/templates/sendmail-common.conf.ubuntu.j2 new file mode 100644 index 0000000..040b533 --- /dev/null +++ b/ansible_tools/roles/set-fail2ban/templates/sendmail-common.conf.ubuntu.j2 @@ -0,0 +1,73 @@ +# Fail2Ban configuration file +# +# Common settings for sendmail actions +# +# Users can override the defaults in sendmail-common.local + +[INCLUDES] + +after = sendmail-common.local + +[Definition] + +# Option: actionstart +# Notes.: command executed once at the start of Fail2Ban. +# Values: CMD +# +actionstart = printf %%b "Subject: [Fail2Ban] <name>: started on <fq-hostname> + Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"` + From: <sendername> <<sender>> + To: <dest>\n + Hi,\n + The jail <name> has been started successfully.\n + Regards,\n + Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest> + +# Option: actionstop +# Notes.: command executed once at the end of Fail2Ban +# Values: CMD +# +actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped on <fq-hostname> + Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"` + From: <sendername> <<sender>> + To: <dest>\n + Hi,\n + The jail <name> has been stopped.\n + Regards,\n + Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest> + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = + +# Option: actionban +# Notes.: command executed when banning an IP. Take care that the +# command is executed with Fail2Ban user rights. +# Tags: See jail.conf(5) man page +# Values: CMD +# +actionban = + +# Option: actionunban +# Notes.: command executed when unbanning an IP. Take care that the +# command is executed with Fail2Ban user rights. +# Tags: See jail.conf(5) man page +# Values: CMD +# +actionunban = + +[Init] + +# Recipient mail address +# +dest = {{ destmail }} + +# Sender mail address +# +sender = {{ sendermail }} + +# Sender display name +# +sendername = {{ sendername }} |
