Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 437646

Summary: net-analyzer/fail2ban - sendmail.conf creates wrong Date Header with German locales
Product: Gentoo Linux Reporter: office
Component: [OLD] ServerAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED DUPLICATE    
Severity: minor CC: office
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description office 2012-10-08 23:43:31 UTC
Hello,

I just found a little configuration error in all of the
sendmail*.conf files (in action.d directory).
This leads to very wrong timestamps when I receive an email, sent by fail2ban in Thunderbird Version 15.0.1 (Timestamp => 01.01.1970)

My locales look like this:
--------------------------
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=
-------------------------

Issuing the date command on my system gives me the following:
# date
Di 9. Okt 01:35:14 CEST 2012

witch is correct.

The date for the date header is created like this (sendmail.conf):
date -u +"%a, %d %h %Y %T +0000"

That gives me the following:
# date -u +"%a, %d %h %Y %T +0000"
Mo, 08 Okt 2012 23:36:44 +0000

Obviously the time zone (+0000) is wrong because it should be (+0200),
so I changed that, but with no effect.

After some little bit of testing I found out, that Thundebird has problems with the month (Okt in German = Oct in English). When I changed from Okt to Oct, the timestamp was correct in Thunderbird.

So I replaced the date command in sendmail.conf with this one:
date -R

witch gives me exaclty what I wanted (date and time in RFC 2822 format):
# date -R
Tue, 09 Oct 2012 01:41:37 +0200

Best regards,

Alex
Comment 1 Mario Kicherer 2012-12-17 10:20:43 UTC
Duplicate of bug #420473 but different solution
Comment 2 Sergey Popov (RETIRED) gentoo-dev 2012-12-17 11:17:57 UTC

*** This bug has been marked as a duplicate of bug 420473 ***