]> Pileus Git - ~andy/fetchmail/blobdiff - sink.c
First round ofmlong-delayed bug fixes.
[~andy/fetchmail] / sink.c
diff --git a/sink.c b/sink.c
index aee27f7e01e0de81f5b8d33eae4f001abe10143d..a8395661adee7b1f9af3da971bc86215344e70c4 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -624,10 +624,15 @@ int stuffline(struct query *ctl, char *buf)
        }
         else /* if (!protocol->delimited)      -- not byte-stuffed already */
        {
-           if (!ctl->mda)
-               SockWrite(ctl->smtp_socket, buf, 1);    /* byte-stuff it */
-           else
-               /* leave it alone */;
+         if (!ctl->mda)      /* byte-stuff it */
+           {
+             if (!ctl->bsmtp)
+               SockWrite(ctl->smtp_socket, buf, 1);
+             else
+               {
+                 fwrite(buf, 1, 1, sinkfp);
+               }
+           }
        }
     }