dovecot-1.3: Fixed deliver -p.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Apr 13 19:36:40 EEST 2009
details: http://hg.dovecot.org/dovecot-1.3/rev/e2f48d895420
changeset: 9083:e2f48d895420
user: Timo Sirainen <tss at iki.fi>
date: Mon Apr 13 12:36:34 2009 -0400
description:
Fixed deliver -p.
diffstat:
1 file changed, 12 insertions(+), 1 deletion(-)
src/deliver/deliver.c | 13 ++++++++++++-
diffs (52 lines):
diff -r ea2117eaa8d1 -r e2f48d895420 src/deliver/deliver.c
--- a/src/deliver/deliver.c Mon Apr 13 12:35:50 2009 -0400
+++ b/src/deliver/deliver.c Mon Apr 13 12:36:34 2009 -0400
@@ -14,7 +14,9 @@
#include "rfc822-parser.h"
#include "message-address.h"
#include "imap-utf7.h"
+#include "settings-parser.h"
#include "master-service.h"
+#include "master-service-settings.h"
#include "mail-storage-service.h"
#include "mail-namespace.h"
#include "raw-storage.h"
@@ -384,6 +386,7 @@ int main(int argc, char *argv[])
const char *mailbox = "INBOX";
const char *destaddr, *user, *errstr, *path, *getopt_str;
struct mail_user *mail_user, *raw_mail_user;
+ struct mail_user_settings *raw_user_set;
struct mail_namespace *raw_ns;
struct mail_namespace_settings raw_ns_set;
struct mail_storage *storage;
@@ -394,6 +397,7 @@ int main(int argc, char *argv[])
struct mailbox_header_lookup_ctx *headers_ctx;
struct mail *mail;
char cwd[PATH_MAX];
+ pool_t settings_pool;
uid_t process_euid;
bool stderr_rejection = FALSE;
time_t mtime;
@@ -527,7 +531,13 @@ int main(int argc, char *argv[])
duplicate_init(mail_user_set_get_storage_set(mail_user->set));
/* create a separate mail user for the internal namespace */
- raw_mail_user = mail_user_alloc(user, mail_user->unexpanded_set);
+ if (master_service_set(service, "mail_full_filesystem_access=yes") < 0)
+ i_unreached();
+
+ settings_pool = pool_alloconly_create("raw settings pool", 4096);
+ raw_user_set = settings_dup(&mail_user_setting_parser_info,
+ mail_user->unexpanded_set, settings_pool);
+ raw_mail_user = mail_user_alloc(user, raw_user_set);
mail_user_set_home(raw_mail_user, "/");
if (mail_user_init(raw_mail_user, &errstr) < 0)
i_fatal("Raw user initialization failed: %s", errstr);
@@ -650,6 +660,7 @@ int main(int argc, char *argv[])
mail_user_unref(&mail_user);
mail_user_unref(&raw_mail_user);
duplicate_deinit();
+ pool_unref(&settings_pool);
mail_storage_service_deinit_user();
master_service_deinit(&service);
More information about the dovecot-cvs
mailing list