aboutsummaryrefslogtreecommitdiffstats
path: root/sink.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-06-07 00:22:01 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-06-07 00:22:01 +0000
commitecc6b895f60f149122eee9a3df2342e4b738fd0e (patch)
tree8c0eef3c29edd622dbfba6055d56056b5f0491db /sink.c
parentacd8b10a2110ff8b76bc589896a77decd1248446 (diff)
downloadfetchmail-ecc6b895f60f149122eee9a3df2342e4b738fd0e.tar.gz
fetchmail-ecc6b895f60f149122eee9a3df2342e4b738fd0e.tar.bz2
fetchmail-ecc6b895f60f149122eee9a3df2342e4b738fd0e.zip
Ready to merge in Julian Haight's changes.
svn path=/trunk/; revision=2899
Diffstat (limited to 'sink.c')
-rw-r--r--sink.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sink.c b/sink.c
index e5b49955..419e0d33 100644
--- a/sink.c
+++ b/sink.c
@@ -508,7 +508,9 @@ int open_sink(struct query *ctl, struct msgblk *msg,
fputs(" BODY=7BIT", sinkfp);
/* exim's BSMTP processor does not handle SIZE */
- /* fprintf(sinkfp, " SIZE=%d\r\n", msg->reallen); */
+ /* fprintf(sinkfp, " SIZE=%d", msg->reallen); */
+
+ fprintf(sinkfp, "\r\n");
/*
* RFC 1123 requires that the domain name part of the
@@ -889,11 +891,14 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward)
}
else if (ctl->bsmtp)
{
+ int error;
+
/* implicit disk-full check here... */
fputs(".\r\n", sinkfp);
+ error = ferror(sinkfp);
if (strcmp(ctl->bsmtp, "-"))
- fclose(sinkfp);
- if (ferror(sinkfp))
+ if (fclose(sinkfp) == EOF) error = 1;
+ if (error)
{
report(stderr,
_("Message termination or close of BSMTP file failed\n"));