Hello,
 
I recently found a bug in msmtp (the embarrassing way, 
unfortunately). msmtp does not handle Bccs correctly if there are
multiple consecutive lines starting with "Bcc:", it only removes every
second of these lines.
 
The attached patch that should fix the problem.
 
Martin
diff --git a/src/smtp.c b/src/smtp.c
index 71c249e..0a7409e 100644
--- a/src/smtp.c
+++ b/src/smtp.c
@@ -1632,16 +1632,13 @@ int smtp_send_mail(smtp_server_t *srv, FILE *mailf, int keep_bcc,
             {
                 if (line_starts)
                 {
-                    if (!in_bcc)
+                    if (strncasecmp(buffer, "Bcc:", 4) == 0)
                     {
-                        if (strncasecmp(buffer, "Bcc:", 4) == 0)
-                        {
-                            in_bcc = 1;
-                            /* remove Bcc header by ignoring this line */
-                            continue;
-                        }
+                        in_bcc = 1;
+                        /* remove Bcc header by ignoring this line */
+                        continue;
                     }
-                    else
+                    else if (in_bcc)
                     {
                         /* continued header lines begin with "horizontal
                          * whitespace" (RFC 2822, section 2.2.3) */
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
msmtp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msmtp-users

Reply via email to