aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/driver.c b/driver.c
index 6ab0dd0f..177f67b9 100644
--- a/driver.c
+++ b/driver.c
@@ -223,8 +223,10 @@ closeUp:
if (closeuserfolder(mboxfd) < 0 && ok == 0)
ok = PS_IOERR;
}
- else if (queryctl->output == TO_SMTP && mboxfd > 0)
+ else if (queryctl->output == TO_SMTP && mboxfd > 0) {
+ SMTP_quit(mboxfd);
close(mboxfd);
+ }
if (ok == PS_IOERR || ok == PS_SOCKET)
perror("do_protocol: cleanUp");
@@ -598,7 +600,7 @@ int rewrite;
if (delimited && *bufp == 0)
break; /* end of message */
}
- strcat(bufp,"\n");
+ strcat(bufp, output == TO_SMTP && !inheaders ? "\r\n" : "\n");
if (inheaders)
{