When upgrading from ssmtp-2.62-r4 to ssmtp-2.62-r6, the message format is changed and this breaks the proper reading of the From: and Subject lines and the message body. Reproducible: Always Steps to Reproduce: 1. Upgrade to ssmtp-2.62-r6 and configure connection to an SMTP server 2. Pipe a message to ssmtp with To: and Subject: lines at the beginning of the message 3. View the sent email in raw format Actual Results: From: is an optional port number that defaults to 25. Message-ID: <xxxxxx@store72m.internal> Date: Thu, 27 Aug 2009 09:11:38 -0400 Date: Thu, 27 Aug 2009 08:23:23 -0500 To: my@email.dom Subject: Calendar This is the message body Expected Results: From: myemail@email.dom Date: Thu, 27 Aug 2009 08:28:39 -0500 To: my@email.dom Subject: Calendar Message-ID: <xxxxxxxx@store72m.internal> This is the message body Piped message to ssmtp looks like this: To: my@email.dom Subject: calendar This is the message body .
I confirm this bug. For me if in user name (system login) consist symbol dot (example: test.org) then header FROM cutted to some symbols. Example: I send pipe message to ssmtp under system user test.ru: >> test.ru@dev-hosts ~ $ echo "test meaasge" | sendmail xxxx@server.org << and got messege with broken head FROM: >> From: e.ru Date: Mon, 07 Sep 2009 15:49:54 +0400 Message-Id: <E1MkcjK-0001tW-4o@xxx.ru> test meaasge << Head From cutted to string "e.ru".
Hi, I think that is the problem I have created a fix for. The Problem exists if a user from which you are sending a mail has no Real Name in /etc/passwd and if FromLineOverride=No (which is default). The problem is a uninitialized variable. Please see my patch and tell if it is working for you. greez Daniel
Created attachment 203775 [details] fix, uninitialized variable
Yes, patch works for me. I tasted it in two instances, where I had a problem, and after its the problem was solved.
The patch works for me also. I no longer see the mangled header.
Fixed in ssmtp-2.62-r7.
Please, stable ssmtp-2.62-r7.
(In reply to comment #7) > Please, stable ssmtp-2.62-r7. > Adding arches.
Stable on alpha.
amd64/arm/x86 stable
sparc stable
ia64/m68k/s390/sh stable
Stable for HPPA.
ppc64 done
ppc stable