mirror of https://github.com/fail2ban/fail2ban
ENH: Provide content-type corresponding to LC_CTYPE for sendmail whois actions (Closes: #600272)
parent
9559fcd3a0
commit
ed9000c469
|
@ -0,0 +1,11 @@
|
|||
[INCLUDES]
|
||||
|
||||
# Load customizations if any available
|
||||
after = common.local
|
||||
|
||||
[DEFAULT]
|
||||
|
||||
_LC_CTYPE = `locale | awk -F= '/LC_CTYPE/{ print $2; }'`
|
||||
|
||||
# To avoid duplication -- define useful header fields
|
||||
_ContentTypeMailHeader = Content-Type: text/plain; charset=%(_LC_CTYPE)s
|
|
@ -2,17 +2,25 @@
|
|||
#
|
||||
# Author: Cyril Jaquier
|
||||
#
|
||||
# $Revision$
|
||||
#
|
||||
|
||||
[INCLUDES]
|
||||
|
||||
# Read common prefixes. If any customizations available -- read them from
|
||||
# common.local
|
||||
before = common.conf
|
||||
|
||||
[Definition]
|
||||
|
||||
# To avoid duplication -- define variable for the content-type
|
||||
ContentType = Content-Type: text/plain; charset=`locale | awk -F= '/LC_CTYPE/{ print $2; }'`
|
||||
|
||||
# Option: actionstart
|
||||
# Notes.: command executed once at the start of Fail2Ban.
|
||||
# Values: CMD
|
||||
#
|
||||
actionstart = printf %%b "Subject: [Fail2Ban] <name>: started
|
||||
Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
||||
%(_ContentTypeMailHeader)s
|
||||
From: Fail2Ban <<sender>>
|
||||
To: <dest>\n
|
||||
Hi,\n
|
||||
|
@ -26,6 +34,7 @@ actionstart = printf %%b "Subject: [Fail2Ban] <name>: started
|
|||
#
|
||||
actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped
|
||||
Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
||||
%(_ContentTypeMailHeader)s
|
||||
From: Fail2Ban <<sender>>
|
||||
To: <dest>\n
|
||||
Hi,\n
|
||||
|
@ -49,6 +58,7 @@ actioncheck =
|
|||
#
|
||||
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip>
|
||||
Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
||||
%(_ContentTypeMailHeader)s
|
||||
From: Fail2Ban <<sender>>
|
||||
To: <dest>\n
|
||||
Hi,\n
|
||||
|
|
|
@ -5,6 +5,12 @@
|
|||
# $Revision$
|
||||
#
|
||||
|
||||
[INCLUDES]
|
||||
|
||||
# Read common prefixes. If any customizations available -- read them from
|
||||
# common.local
|
||||
before = common.conf
|
||||
|
||||
[Definition]
|
||||
|
||||
# Option: actionstart
|
||||
|
@ -13,6 +19,7 @@
|
|||
#
|
||||
actionstart = printf %%b "Subject: [Fail2Ban] <name>: started
|
||||
Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
||||
%(_ContentTypeMailHeader)s
|
||||
From: Fail2Ban <<sender>>
|
||||
To: <dest>\n
|
||||
Hi,\n
|
||||
|
@ -26,6 +33,7 @@ actionstart = printf %%b "Subject: [Fail2Ban] <name>: started
|
|||
#
|
||||
actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped
|
||||
Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
||||
%(_ContentTypeMailHeader)s
|
||||
From: Fail2Ban <<sender>>
|
||||
To: <dest>\n
|
||||
Hi,\n
|
||||
|
@ -49,6 +57,7 @@ actioncheck =
|
|||
#
|
||||
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip>
|
||||
Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
||||
%(_ContentTypeMailHeader)s
|
||||
From: Fail2Ban <<sender>>
|
||||
To: <dest>\n
|
||||
Hi,\n
|
||||
|
|
Loading…
Reference in New Issue