diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-06-05 20:49:59 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-06-05 20:49:59 +0000 |
commit | e3c18f4c5b8fd70763d32d2e0bb67e20ea7a1160 (patch) | |
tree | ab3eba78d7cc589d59e951da9fc48a2629d4051e | |
parent | 3e5b4dd8260187175b66e1943f686939b5d2c628 (diff) | |
download | fetchmail-e3c18f4c5b8fd70763d32d2e0bb67e20ea7a1160.tar.gz fetchmail-e3c18f4c5b8fd70763d32d2e0bb67e20ea7a1160.tar.bz2 fetchmail-e3c18f4c5b8fd70763d32d2e0bb67e20ea7a1160.zip |
Yet another step towards handling zero-length messages.
svn path=/trunk/; revision=1068
-rw-r--r-- | driver.c | 59 |
1 files changed, 28 insertions, 31 deletions
@@ -1119,37 +1119,6 @@ int delimited; /* does the protocol use a message delimiter? */ } } - /* - * End-of-message processing starts here - */ - - if (outlevel == O_VERBOSE) - fputc('\n', stderr); - - if (ctl->mda) - { - int rc; - - /* close the delivery pipe, we'll reopen before next message */ - rc = pclose(sinkfp); - signal(SIGCHLD, sigchld); - if (rc) - { - error(0, -1, "MDA exited abnormally or returned nonzero status"); - return(PS_IOERR); - } - } - else if (forward) - { - /* write message terminator */ - if (SMTP_eom(ctl->smtp_socket) != SM_OK) - { - error(0, -1, "SMTP listener refused delivery"); - ctl->errcount++; - return(PS_TRANSIENT); - } - } - return(PS_SUCCESS); } @@ -1593,6 +1562,34 @@ const struct method *proto; /* protocol method table */ } } + /* end-of-message processing starts here */ + if (outlevel == O_VERBOSE) + fputc('\n', stderr); + + if (ctl->mda) + { + int rc; + + /* close the delivery pipe, we'll reopen before next message */ + rc = pclose(sinkfp); + signal(SIGCHLD, sigchld); + if (rc) + { + error(0, -1, "MDA exited abnormally or returned nonzero status"); + goto cleanUp; + } + } + else if (!suppress_forward) + { + /* write message terminator */ + if (SMTP_eom(ctl->smtp_socket) != SM_OK) + { + error(0, -1, "SMTP listener refused delivery"); + ctl->errcount++; + suppress_delete = TRUE; + } + } + fetches++; } |