The -f option is not totally ignored and the code in line 1886 - 1888 is not 
the problem.

Please call:

$ cat email.txt | ssmtp -f [email protected]

with an email template not containing a "From" line.

Here is the corresponding smtp connection:

[<-] 220 mailserver Service ready by David.fx (0355) ESMTP Server 
(Tobit.Software, Germany)
[->] HELO host.domain.tld
[<-] 250 mailserver Hello host.domain.tld, Guten Tag!
[->] MAIL FROM:<[email protected]>
[<-] 250 <[email protected]>... Sender ok
[->] RCPT TO:<[email protected]>
[<-] 250 <[email protected]>... Recipient ok
[->] DATA
[<-] 354 Start mail input, end with <CRLF>.<CRLF>
[->] Received: by host.domain.tld (sSMTP sendmail emulation); Fri, 09 Mar 2012 
10:04:55 +0100
[->] From: "User" <[email protected]>
[->] Date: Fri, 09 Mar 2012 10:04:55 +0100
[->] To: [email protected]
[->] Subject: Testmail
[->] MIME-Version: 1.0
[->] Content-Type: text/plain; charset="utf-8"
[->] 
[->] This is a test message.
[->] 
[->] Regards,
[->] The tester
[->] .
[<-] 250 Message accepted for delivery
[->] QUIT
[<-] 221 mailserver Service closing transmission channel

You can see, the "From" line in the mail template is replaced correctly, but 
the "MAIL FROM:" in smtp connection is the old local user.

In the code there is this part:

1550         /* Send "MAIL FROM:" line */
1551         outbytes += smtp_write(sock, "MAIL FROM:<%s>", uad);

I think "uad" is not the right variable. Is it possible to use "from" here?

I think there has to set an other variable (with the given from address).

Thanks
Stephan


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to