diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-06-07 00:22:01 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-06-07 00:22:01 +0000 |
commit | ecc6b895f60f149122eee9a3df2342e4b738fd0e (patch) | |
tree | 8c0eef3c29edd622dbfba6055d56056b5f0491db /sink.c | |
parent | acd8b10a2110ff8b76bc589896a77decd1248446 (diff) | |
download | fetchmail-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.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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")); |