aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--driver.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/driver.c b/driver.c
index 5f69bdcd..06bb6dc1 100644
--- a/driver.c
+++ b/driver.c
@@ -673,7 +673,7 @@ struct query *ctl; /* query control record */
if (ctl->mda[0])
write(mboxfd, errmsg, strlen(errmsg));
- else
+ else if (sinkfp)
SockWrite(errmsg, strlen(errmsg), sinkfp);
}
@@ -682,7 +682,8 @@ struct query *ctl; /* query control record */
/* SMTP byte-stuffing */
if (*bufp == '.' && ctl->mda[0] == 0)
- SockWrite(".", 1, sinkfp);
+ if (sinkfp)
+ SockWrite(".", 1, sinkfp);
/* replace all LFs with CR-LF in the line */
if (!ctl->mda[0])
@@ -719,7 +720,7 @@ struct query *ctl; /* query control record */
if (closemailpipe(mboxfd))
return(PS_IOERR);
}
- else
+ else if (sinkfp)
{
/* write message terminator */
if (SMTP_eom(sinkfp) != SM_OK)