maildir-storage.c revision e562002ef5607c8bad5216de484098493f00391e
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen/* Copyright (C) 2002-2003 Timo Sirainen */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen#include "subscription-file/subscription-file.h"
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen#define CREATE_MODE 0770 /* umask() should limit it more */
9865d9e7c5713e41db939222ed9c0225a11fb99eTimo Sirainenstatic const char *maildirs[] = { "cur", "new", "tmp", NULL };
9865d9e7c5713e41db939222ed9c0225a11fb99eTimo Sirainenmaildir_create(const char *data, const char *user,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const char *root_dir, *inbox_dir, *index_dir, *control_dir;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen inbox_dir = root_dir = index_dir = control_dir = NULL;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen /* we'll need to figure out the maildir location ourself.
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen it's either root dir if we've already chroot()ed, or
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen $HOME/Maildir otherwise */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen /* <Maildir> [:INBOX=<dir>] [:INDEX=<dir>] [:CONTROL=<dir>] */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen } while (p != NULL);
48d8312488089dc1a8360991f0881d91095c21eaTimo Sirainen /* strip trailing '/' */
return FALSE;
return TRUE;
return FALSE;
return TRUE;
return FALSE;
return TRUE;
return FALSE;
return TRUE;
if (p == NULL)
return name;
return name;
return name;
return name;
if (*p == sep)
*p = MAILDIR_FS_SEP;
return dup;
const char *name)
return NULL;
const char *name)
if (verify) {
const char *dir;
const char *dir;
const char *inbox;
static struct mailbox *
return NULL;
static struct mailbox *
const char *path;
return NULL;
return NULL;
return NULL;
name);
return NULL;
path);
return NULL;
const char *name,
const char *path;
const char *name)
int count;
name);
count = 0;
count++;
int ret;
ret = 0;
const char *list_name;
t_push();
t_pop();
t_pop();
return ret;
if (ret < 0)
const char *path;
const char *name,
const char *path;
path);
int ret = 0;
return ret;
unsigned int min_newmail_notify_interval)
if (flags == 0) {
NULL,