From 3671930b106a62a86cd1c7984204d5f094a8d5ff Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 24 Sep 1996 14:35:08 +0000 Subject: Improved RFC822 conformance in SMTP code. svn path=/trunk/; revision=116 --- driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'driver.c') 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) { -- cgit v1.2.3