aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-09-24 14:35:08 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-09-24 14:35:08 +0000
commit3671930b106a62a86cd1c7984204d5f094a8d5ff (patch)
treef8157438014ff468d0f31261f90838e31120fe5d /driver.c
parent553ac7f6c80d96d41dc02c2d8bba240a25c35061 (diff)
downloadfetchmail-3671930b106a62a86cd1c7984204d5f094a8d5ff.tar.gz
fetchmail-3671930b106a62a86cd1c7984204d5f094a8d5ff.tar.bz2
fetchmail-3671930b106a62a86cd1c7984204d5f094a8d5ff.zip
Improved RFC822 conformance in SMTP code.
svn path=/trunk/; revision=116
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)
{