Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145456 - mail-mta/ssmtp creates funny date headers on gentoo-embedded
Summary: mail-mta/ssmtp creates funny date headers on gentoo-embedded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-29 02:18 UTC by Natanael Copa
Modified: 2008-06-10 20:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
files/ssmtp-2.61-bug145456.patch (ssmtp-2.61-bug145456.patch,393 bytes, patch)
2006-08-29 02:40 UTC, Natanael Copa
Details | Diff
ebuild that uses patch (ssmtp-2.61-r2.ebuild,3.31 KB, text/plain)
2006-08-29 02:44 UTC, Natanael Copa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2006-08-29 02:18:49 UTC
When ssmtp is compiled against uclibc, it will create funny date headers:

Date: Tue, %_d Aug 2006 06:03:21 +0000 UV

Note the %_d.

This is because ssmtp uses a gnu extention in strftime. (see man strftime under "GLIBC NOTES", _ (underscore))

I did a quick check what they do in Freebsd (since they dont use gnu libc) and as I suspected, there was a patch:

--- arpadate.c.orig     Sun Dec  8 18:30:13 2002
+++ arpadate.c  Mon Apr  7 01:17:58 2003
@@ -79,7 +79,7 @@
        time_t now;

        /* RFC822 format string borrowed from GNU shellutils date.c */
-       const char *format = "%a, %_d %b %Y %H:%M:%S %z";
+       const char *format = "%a, %e %b %Y %H:%M:%S %z";

        now = time(NULL);


The solution should be to use the portable %e instead of GNU specific %_d.
Comment 1 Natanael Copa 2006-08-29 02:40:42 UTC
Created attachment 95350 [details, diff]
files/ssmtp-2.61-bug145456.patch

patch created against ssmtp-2.61-r2 and tested on uclibc. Works like a charm ;)
Comment 2 Natanael Copa 2006-08-29 02:44:18 UTC
Created attachment 95351 [details]
ebuild that uses patch

For your convienece.
Comment 3 Natanael Copa 2006-12-04 22:52:00 UTC
Could this patch please be applied? It does not hurt GNU systems and it solves a real problem on non-GNU systems. (like uclibc freebsd)
Comment 4 Natanael Copa 2008-03-17 13:07:20 UTC
Whats the status here? 

This patch is really trivial. Could someone just commit and get done with it? (or at least close with a WONTFIX so know I'll have to maintain it my local overlay)

Comment 5 Tobias Scherbaum (RETIRED) gentoo-dev 2008-06-10 20:15:35 UTC
This one has been fixed upstream in 2.62 which just hit CVS. Please test and re-open if this bug still occurs.