fd = mkstemp(tmpfile);
/* cannot create tmpfile, try to continue reading */
if (fd < 0)
- bye(EX_TEMPFAIL, "%m");
+ bye(EX_TEMPFAIL, "Cannot create temporary file: %m");
else {
will_save = 1;
b->body = NULL;
res = write(fd, buf, MAIL_LEN);
if (res < MAIL_LEN) {
unlink(b->tmpfile);
- bye(EX_TEMPFAIL, "%m");
+ bye(EX_TEMPFAIL, "Cannot write to remporary file: %m");
}
break;
}
res = write(fd, buf, MAIL_LEN);
if (res < MAIL_LEN) {
unlink(b->tmpfile);
- bye(EX_TEMPFAIL, "%m");
+ bye(EX_TEMPFAIL, "Cannot write to temporary file: %m");
}
}
}
res = write(fd, buf, j);
if (res < j) {
unlink(b->tmpfile);
- bye(EX_TEMPFAIL, "%m");
+ bye(EX_TEMPFAIL, "Cannot write to temporary file: %m");
}
}
return b;
}
write_char_to_mailbox('\n', fd);
- /* body */
- /* FIXME: do not forget change Content-Length */
if (email->body) {
for (pc = email->body; pc < email->body + email->body_len; pc++){
write_char_to_mailbox(*pc, fd);