-/* $Cambridge: exim/src/src/spool_mbox.c,v 1.15 2010/06/05 11:13:30 pdp Exp $ */
-
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
mbox_file = modefopen(mbox_path, "wb", SPOOL_MODE);
if (mbox_file == NULL) {
log_write(0, LOG_MAIN|LOG_PANIC, "%s", string_open_failed(errno,
- "scan file %s", mbox_file));
+ "scan file %s", mbox_path));
goto OUT;
};
};
/* End headers */
- (void)fwrite("\n", 1, 1, mbox_file);
+ if (fwrite("\n", 1, 1, mbox_file) != 1) {
+ log_write(0, LOG_MAIN|LOG_PANIC, "Error/short write while writing \
+ message headers to %s", mbox_path);
+ goto OUT;
+ }
/* copy body file */
if (source_file_override == NULL) {
if (Ustat(mbox_path, &statbuf) != 0 ||
(yield = Ufopen(mbox_path,"rb")) == NULL) {
log_write(0, LOG_MAIN|LOG_PANIC, "%s", string_open_failed(errno,
- "scan file %s", mbox_file));
+ "scan file %s", mbox_path));
goto OUT;
};