From 9fa54cf23309780f3563838c9d95a24e4b9a4c38 Mon Sep 17 00:00:00 2001 From: Tom Hendrikx Date: Fri, 18 Nov 2011 22:08:41 +0100 Subject: [PATCH] Add Date: header for sendmail*.conf actions According to rfc2822, Date: headers are not optional. Added these to all sendmail action templates, format specification should conform to rfc and be portable across multiple platforms. --- config/action.d/sendmail-whois-lines.conf | 3 +++ config/action.d/sendmail-whois.conf | 3 +++ config/action.d/sendmail.conf | 3 +++ 3 files changed, 9 insertions(+) diff --git a/config/action.d/sendmail-whois-lines.conf b/config/action.d/sendmail-whois-lines.conf index 0624d5924..d1e6e40f3 100644 --- a/config/action.d/sendmail-whois-lines.conf +++ b/config/action.d/sendmail-whois-lines.conf @@ -12,6 +12,7 @@ # Values: CMD # actionstart = printf %%b "Subject: [Fail2Ban] : started + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n @@ -24,6 +25,7 @@ actionstart = printf %%b "Subject: [Fail2Ban] : started # Values: CMD # actionstop = printf %%b "Subject: [Fail2Ban] : stopped + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n @@ -46,6 +48,7 @@ actioncheck = # Values: CMD # actionban = printf %%b "Subject: [Fail2Ban] : banned + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n diff --git a/config/action.d/sendmail-whois.conf b/config/action.d/sendmail-whois.conf index d029005c2..363c33982 100644 --- a/config/action.d/sendmail-whois.conf +++ b/config/action.d/sendmail-whois.conf @@ -12,6 +12,7 @@ # Values: CMD # actionstart = printf %%b "Subject: [Fail2Ban] : started + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n @@ -24,6 +25,7 @@ actionstart = printf %%b "Subject: [Fail2Ban] : started # Values: CMD # actionstop = printf %%b "Subject: [Fail2Ban] : stopped + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n @@ -46,6 +48,7 @@ actioncheck = # Values: CMD # actionban = printf %%b "Subject: [Fail2Ban] : banned + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n diff --git a/config/action.d/sendmail.conf b/config/action.d/sendmail.conf index e705bb1ee..bdc2a3b67 100644 --- a/config/action.d/sendmail.conf +++ b/config/action.d/sendmail.conf @@ -12,6 +12,7 @@ # Values: CMD # actionstart = printf %%b "Subject: [Fail2Ban] : started + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n @@ -24,6 +25,7 @@ actionstart = printf %%b "Subject: [Fail2Ban] : started # Values: CMD # actionstop = printf %%b "Subject: [Fail2Ban] : stopped + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n @@ -46,6 +48,7 @@ actioncheck = # Values: CMD # actionban = printf %%b "Subject: [Fail2Ban] : banned + Date: `date -u +"%%a, %%d %%h %%Y %%T +0000"` From: Fail2Ban <> To: \n Hi,\n