mbox-save.c revision af3b53652d4e3e1952254c15cdcf4a413f8e2a12
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "hostpid.h"
#include "obuffer.h"
#include "write-full.h"
#include "mbox-index.h"
#include "mbox-lock.h"
#include "mbox-storage.h"
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <netdb.h>
{
else {
"Error writing to mbox file %s: %m", mbox_path);
}
return FALSE;
}
{
char ch;
"fstat() failed for mbox file %s: %m", mbox_path);
return FALSE;
}
return TRUE;
"lseek() failed for mbox file %s: %m", mbox_path);
return FALSE;
}
"read() failed for mbox file %s: %m", mbox_path);
return FALSE;
}
if (ch != '\n') {
*pos += 1;
}
return TRUE;
}
const char *mbox_path)
{
return TRUE;
}
{
if (*my_hostdomain == '\0') {
hostpid_init();
/* failed, use just the hostname */
name = my_hostname;
}
}
/* save in local timezone, no matter what it was given with */
return TRUE;
}
const char *mbox_path,
{
const char *str;
unsigned int field;
int i;
if (flags == 0)
return TRUE;
}
"\n", NULL);
}
if (flags & MAIL_CUSTOM_FLAGS_MASK) {
strlen(custom_flags[i])) < 0)
}
}
}
return TRUE;
}
{
const char *mbox_path;
int failed;
return FALSE;
}
/* we don't need the real flags, easier to keep using our own.
real_flags = flags;
return FALSE;
return FALSE;
else {
t_push();
data_stack_pool, 4096,
0, FALSE);
internal_date) ||
custom_flags) ||
/* failed, truncate file back to original size */
}
t_pop();
}
return mail_storage_set_index_error(ibox);
return !failed;
}