Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489872 - mail-mta/ssmtp-2.64-r2 case sensitive from header
Summary: mail-mta/ssmtp-2.64-r2 case sensitive from header
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-10-30 12:59 UTC by Puggan
Modified: 2019-03-27 16:40 UTC (History)
1 user (show)

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


Attachments
Patch copied from comment (ssmtp_bug489872.patch,339 bytes, patch)
2019-03-27 16:40 UTC, Puggan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Puggan 2013-10-30 12:59:34 UTC
I noticed some of our mails got the wrong return path 
when the header is writen as:
FROM: user@domain.com
while it works fine for
From: user@domain.com
and
FROM: <user@domain.com>

the problem seams to be in from_strip
that uses a case-senstive compare.

The following patch should fix that.

---------------------
--- ssmtp-2.64/ssmtp.c  2009-11-23 10:55:11.000000000 +0100
+++ ssmtp.c     2013-10-30 13:43:30.000000000 +0100
@@ -433,7 +433,7 @@
        (void)fprintf(stderr, "*** from_strip(): str = [%s]\n", str);
 #endif
 
-       if(strncmp("From:", str, 5) == 0) {
+       if(strncasecmp("From:", str, 5) == 0) {
                str += 5;
        }
----------------------
Comment 1 Puggan 2019-03-27 16:40:44 UTC
Created attachment 570928 [details, diff]
Patch copied from comment

The comment included a patch, uploading it as a file