Package: ssmtp Version: 2.64-8 Severity: normal As it stands ssmtp will either set the envelope from address based on the "From:" (note the colon) header or override both the "From:" address as well as the envelope address.
The second behaviour is wrong as you should never change the "From:" header, only the envelope header should be modified when forwarding an email. IOW the current behaviour either results in all outgoing emails to appear to have originated from the sending user, or it will cause SPF failures because the envelope sender does not match the outbound SMTP server. This patch changes the behaviour of ssmtp when FromLineOverride=NO to not modify the "From:" header. This allows forwarded emails to have the correct envelope sender as well as retaining the original "From:" header. -- System Information Debian Release: 10.0 Kernel Version: Linux gwarestrin 5.2.0+ #3 SMP PREEMPT Tue Aug 20 22:11:45 AEST 2019 x86_64 GNU/Linux Versions of the packages ssmtp depends on: ii debconf 1.5.71 all Debian configuration management system libc6 Not installed or no info libgnutls-openssl27 Not installed or no info ii debconf 1.5.71 all Debian configuration management system ^^^ (Provides virtual package debconf-2.0) --- Ignoring conffile /etc/logcheck/ignore.d.server/ssmtp (not world readable) diff --git a/.ssmtp.c.swp b/.ssmtp.c.swp deleted file mode 100644 index c9c2b06..0000000 Binary files a/.ssmtp.c.swp and /dev/null differ diff --git a/ssmtp.c b/ssmtp.c index 7ab79ab..1833d13 100644 --- a/ssmtp.c +++ b/ssmtp.c @@ -701,9 +701,6 @@ void header_save(char *str) if(override_from == True) { uad = from_strip(ht->string); } - else { - return; - } #endif have_from = True; }