dovecot-2.0: Merged latest v2.0 changes.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Oct 2 14:34:07 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/309362da6431
changeset: 12267:309362da6431
user: Timo Sirainen <tss at iki.fi>
date: Fri Sep 24 19:40:02 2010 +0100
description:
Merged latest v2.0 changes.
diffstat:
.hgsigs | 1 +
.hgtags | 1 +
NEWS | 22 +
TODO | 3 +-
configure.in | 3 +-
src/anvil/anvil-settings.c | 4 +-
src/auth/auth-settings.c | 4 +-
src/auth/passdb-vpopmail.c | 4 +-
src/config/old-set-parser.c | 12 +
src/director/director-settings.c | 4 +-
src/doveadm/doveadm-mail.c | 8 +-
src/doveadm/doveadm-mail.h | 3 +
src/dsync/dsync-worker-local.c | 8 +-
src/lda/main.c | 8 +
src/lib-auth/auth-client-request.c | 23 +-
src/lib-dict/dict-client.c | 9 +-
src/lib-dict/dict-file.c | 4 +
src/lib-index/mail-transaction-log-file.c | 10 +
src/lib-index/mail-transaction-log-private.h | 1 +
src/lib-lda/Makefile.am | 6 +-
src/lib-lda/duplicate.c | 23 +-
src/lib-master/master-login-auth.c | 111 +++++++-
src/lib-master/service-settings.h | 5 +
src/lib-sql/driver-pgsql.c | 3 +-
src/lib-storage/Makefile.am | 7 +-
src/lib-storage/index/dbox-multi/mdbox-map-private.h | 2 +-
src/lib-storage/index/dbox-multi/mdbox-map.c | 35 ++-
src/lib-storage/index/dbox-multi/mdbox-map.h | 3 +-
src/lib-storage/index/dbox-multi/mdbox-storage.c | 2 +-
src/lib-storage/index/dbox-single/sdbox-storage.c | 2 +-
src/lib-storage/index/maildir/maildir-copy.c | 134 ++--------
src/lib-storage/index/maildir/maildir-mail.c | 13 +-
src/lib-storage/index/maildir/maildir-save.c | 142 +++++++----
src/lib-storage/index/maildir/maildir-storage.h | 9 +-
src/lib-storage/index/maildir/maildir-sync-index.c | 67 +++--
src/lib-storage/index/maildir/maildir-sync.c | 2 +
src/lib-storage/index/maildir/maildir-sync.h | 2 +
src/lib-storage/index/maildir/maildir-uidlist.c | 10 +-
src/lib-storage/list/mailbox-list-fs-iter.c | 21 +-
src/lib-storage/list/subscription-file.c | 10 +-
src/lib-storage/mail-storage.c | 2 +
src/lib-storage/mail-user.c | 5 +
src/lib-storage/mail-user.h | 3 +-
src/lib/fdpass.c | 11 +-
src/lib/ioloop-poll.c | 8 +
src/lib/network.c | 13 +-
src/log/log-settings.c | 4 +-
src/master/master-settings.c | 29 ++
src/plugins/expire/doveadm-expire.c | 12 +-
src/plugins/quota/quota-count.c | 4 +
src/plugins/quota/quota-private.h | 2 +
src/plugins/quota/quota-storage.c | 20 +-
src/plugins/quota/quota.c | 297 ++++++++++++++----------
src/plugins/quota/quota.h | 16 +-
src/ssl-params/ssl-params-settings.c | 4 +
55 files changed, 765 insertions(+), 406 deletions(-)
diffs (truncated from 2433 to 300 lines):
diff -r b48b63c1ccb8 -r 309362da6431 .hgsigs
--- a/.hgsigs Thu Sep 16 19:19:41 2010 +0100
+++ b/.hgsigs Fri Sep 24 19:40:02 2010 +0100
@@ -16,3 +16,4 @@
d0d3ba81d2052258b099b9f660866369a56d4a9c 0 iEYEABECAAYFAkxpTKEACgkQyUhSUUBVisnZHgCfW/F0r/rVwHaxm7DNeisa2FVprooAn2c17typ1b38O+sagsqwD1IbPYzf
8baa8ccb40216d626b9ca66309fca9437a76e6e2 0 iEYEABECAAYFAkxz/QQACgkQyUhSUUBViskVrwCfcB/267/lsPntHEyCkn5nG0cEP34AnjN9AzBApHkaHiDViRxS697HXbMj
f4eb5306587964fee1074235de19c2c395249156 0 iEYEABECAAYFAkyHvBIACgkQyUhSUUBVismKMACfe7pcnrMHVmdmaUNgvyIperV9Uw4AoJ7bU7dh9SCPE868D3if2bcWNJHa
+a475e8d4eb213ae00d1d5e98cb75a470e34b252d 0 iEYEABECAAYFAkyTv5EACgkQyUhSUUBVisl4hgCfQxnLPCOrJ/opxRG3q30lWdML46AAni7Dotuow6acR2kK12l5jLl7fwu6
diff -r b48b63c1ccb8 -r 309362da6431 .hgtags
--- a/.hgtags Thu Sep 16 19:19:41 2010 +0100
+++ b/.hgtags Fri Sep 24 19:40:02 2010 +0100
@@ -53,3 +53,4 @@
d0d3ba81d2052258b099b9f660866369a56d4a9c 2.0.0
8baa8ccb40216d626b9ca66309fca9437a76e6e2 2.0.1
f4eb5306587964fee1074235de19c2c395249156 2.0.2
+a475e8d4eb213ae00d1d5e98cb75a470e34b252d 2.0.3
diff -r b48b63c1ccb8 -r 309362da6431 NEWS
--- a/NEWS Thu Sep 16 19:19:41 2010 +0100
+++ b/NEWS Fri Sep 24 19:40:02 2010 +0100
@@ -1,3 +1,25 @@
+v2.0.3 2010-09-17 Timo Sirainen <tss at iki.fi>
+
+ * dovecot-lda: Removed use of non-standard Envelope-To: header as a
+ default for -a. Set lda_original_recipient_header=Envelope-To to
+ returns the old behavior.
+
+ + Added support for reverse quota warnings (i.e. when quota goes back
+ under the limit). This is enabled by adding '-' to beginning of
+ quota_warning value. Based on patch by Jeroen Koekkoek.
+ + dovecot-lda: Added lda_original_recipient_header setting, which is
+ used for getting original recipient if -a isn't used.
+ + dovecot-lda: Added -r parameter to specify final recipient address.
+ (It may differ from original address for e.g. aliases.)
+ + Maildir: uidlist file can now override message's GUID, making it
+ possible for multiple messages in a mailbox to have the same GUID.
+ This also fixes dsync's message conflict resolution.
+ - dovecot-lda: If destination user isn't found, exit with EX_NOUSER,
+ not EX_TEMPFAIL.
+ - dsync: Fixed handling \Noselect mailboxes
+ - Fixed an infinite loop introduced by v2.0.2's message parser changes.
+ - Fixed a crash introduced by v2.0.2's istream-crlf changes.
+
v2.0.2 2010-09-08 Timo Sirainen <tss at iki.fi>
* vpopmail support is disabled for now, since it's broken. You can use
diff -r b48b63c1ccb8 -r 309362da6431 TODO
--- a/TODO Thu Sep 16 19:19:41 2010 +0100
+++ b/TODO Fri Sep 24 19:40:02 2010 +0100
@@ -1,8 +1,9 @@
- dbox attachments:
- make sure attachments aren't opened while fetching other mime parts
+ - doveadm director assign <user> <host> - do it permanently in memory
+ - LSUB shows subscribed namespace prefix as prefix/, also SUBSCRIBE adds the /
- sql pool: if async query is pending and sync query is sent and there
are no more empty connections, it should flush the async query first
- - DELETEACL doesn't update shared dict
- NTLMv1 and LM should be disabled if disable_plaintext_auth=yes
- SEARCH SENT*/HEADER/etc. doesn't seem optimized when using with TEXT/BODY
diff -r b48b63c1ccb8 -r 309362da6431 configure.in
--- a/configure.in Thu Sep 16 19:19:41 2010 +0100
+++ b/configure.in Fri Sep 24 19:40:02 2010 +0100
@@ -1,5 +1,5 @@
AC_PREREQ([2.59])
-AC_INIT([Dovecot],[2.0.2],[dovecot at dovecot.org])
+AC_INIT([Dovecot],[2.0.3],[dovecot at dovecot.org])
AC_CONFIG_SRCDIR([src])
AM_INIT_AUTOMAKE([foreign])
@@ -112,7 +112,6 @@
vpopmail_home="$withval"
want_vpopmail=yes
fi
- AC_ERROR([vpopmail support is broken. fix it or access its db another way.])
fi, [
want_vpopmail=no
])
diff -r b48b63c1ccb8 -r 309362da6431 src/anvil/anvil-settings.c
--- a/src/anvil/anvil-settings.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/anvil/anvil-settings.c Fri Sep 24 19:40:02 2010 +0100
@@ -44,5 +44,7 @@
.unix_listeners = { { &anvil_unix_listeners_buf,
sizeof(anvil_unix_listeners[0]) } },
.fifo_listeners = ARRAY_INIT,
- .inet_listeners = ARRAY_INIT
+ .inet_listeners = ARRAY_INIT,
+
+ .process_limit_1 = TRUE
};
diff -r b48b63c1ccb8 -r 309362da6431 src/auth/auth-settings.c
--- a/src/auth/auth-settings.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/auth/auth-settings.c Fri Sep 24 19:40:02 2010 +0100
@@ -57,7 +57,9 @@
.unix_listeners = { { &auth_unix_listeners_buf,
sizeof(auth_unix_listeners[0]) } },
.fifo_listeners = ARRAY_INIT,
- .inet_listeners = ARRAY_INIT
+ .inet_listeners = ARRAY_INIT,
+
+ .process_limit_1 = TRUE
};
/* <settings checks> */
diff -r b48b63c1ccb8 -r 309362da6431 src/auth/passdb-vpopmail.c
--- a/src/auth/passdb-vpopmail.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/auth/passdb-vpopmail.c Fri Sep 24 19:40:02 2010 +0100
@@ -182,8 +182,8 @@
}
if (!vauth_load_initialized) {
vauth_load_initialized = TRUE;
- if (!vauth_load_module(NULL))
- i_fatal("vpopmail: vauth_load_module() failed");
+ if (vauth_open(0) != 0)
+ i_fatal("vpopmail: vauth_open() failed");
}
return &module->module;
}
diff -r b48b63c1ccb8 -r 309362da6431 src/config/old-set-parser.c
--- a/src/config/old-set-parser.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/config/old-set-parser.c Fri Sep 24 19:40:02 2010 +0100
@@ -140,6 +140,18 @@
set_rename(ctx, key, "ssl", value);
return TRUE;
}
+ if (strcmp(key, "sieve") == 0 ||
+ strcmp(key, "sieve_storage") == 0) {
+ if (strcmp(key, "sieve_storage") == 0)
+ obsolete(ctx, "sieve_storage has been moved into plugin { sieve_dir }");
+ else
+ obsolete(ctx, "%s has been moved into plugin {} section", key);
+
+ config_apply_line(ctx, "", "plugin=", NULL);
+ config_apply_line(ctx, key,
+ t_strdup_printf("plugin/%s=%s", key, value), NULL);
+ return TRUE;
+ }
if (strcmp(key, "fsync_disable") == 0) {
if (strcasecmp(value, "yes") == 0)
value = "never";
diff -r b48b63c1ccb8 -r 309362da6431 src/director/director-settings.c
--- a/src/director/director-settings.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/director/director-settings.c Fri Sep 24 19:40:02 2010 +0100
@@ -55,7 +55,9 @@
sizeof(director_unix_listeners[0]) } },
.fifo_listeners = { { &director_fifo_listeners_buf,
sizeof(director_fifo_listeners[0]) } },
- .inet_listeners = ARRAY_INIT
+ .inet_listeners = ARRAY_INIT,
+
+ .process_limit_1 = TRUE
};
#undef DEF
#define DEF(type, name) \
diff -r b48b63c1ccb8 -r 309362da6431 src/doveadm/doveadm-mail.c
--- a/src/doveadm/doveadm-mail.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/doveadm/doveadm-mail.c Fri Sep 24 19:40:02 2010 +0100
@@ -366,7 +366,6 @@
MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT;
struct doveadm_mail_cmd_context *ctx;
const char *getopt_args, *username, *wildcard_user;
- bool iter_single_user;
int c;
if (doveadm_debug)
@@ -403,8 +402,9 @@
cmd->name, argv[0]);
}
- iter_single_user = !ctx->iterate_all_users && wildcard_user == NULL;
- if (doveadm_print_is_initialized() && !iter_single_user) {
+ ctx->iterate_single_user =
+ !ctx->iterate_all_users && wildcard_user == NULL;
+ if (doveadm_print_is_initialized() && !ctx->iterate_single_user) {
doveadm_print_header("username", "Username",
DOVEADM_PRINT_HEADER_FLAG_STICKY |
DOVEADM_PRINT_HEADER_FLAG_HIDE_TITLE);
@@ -412,7 +412,7 @@
ctx->v.init(ctx, (const void *)argv);
- if (iter_single_user) {
+ if (ctx->iterate_single_user) {
doveadm_mail_single_user(ctx, username, service_flags);
} else {
service_flags |= MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP;
diff -r b48b63c1ccb8 -r 309362da6431 src/doveadm/doveadm-mail.h
--- a/src/doveadm/doveadm-mail.h Thu Sep 16 19:19:41 2010 +0100
+++ b/src/doveadm/doveadm-mail.h Fri Sep 24 19:40:02 2010 +0100
@@ -48,6 +48,9 @@
ARRAY_DEFINE(module_contexts, union doveadm_mail_cmd_module_context *);
+ /* We're handling only a single user */
+ unsigned int iterate_single_user:1;
+ /* We're going through all users (not set for wildcard usernames) */
unsigned int iterate_all_users:1;
unsigned int failed:1;
};
diff -r b48b63c1ccb8 -r 309362da6431 src/dsync/dsync-worker-local.c
--- a/src/dsync/dsync-worker-local.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/dsync/dsync-worker-local.c Fri Sep 24 19:40:02 2010 +0100
@@ -1097,6 +1097,11 @@
name = mailbox_name_force_cleanup(name,
worker->alt_char);
}
+ if (!mailbox_list_is_valid_create_name(ns->list, name)) {
+ /* probably some reserved name (e.g. dbox-Mails) */
+ name = t_strconcat("_", name, NULL);
+ }
+ i_assert(mailbox_list_is_valid_create_name(ns->list, name));
}
return name;
}
@@ -1690,7 +1695,8 @@
mailbox_save_set_guid(save_ctx, msg->guid);
local_worker_msg_save_set_metadata(worker, worker->mail->box,
save_ctx, msg);
- mailbox_save_set_pop3_uidl(save_ctx, data->pop3_uidl);
+ if (*data->pop3_uidl != '\0')
+ mailbox_save_set_pop3_uidl(save_ctx, data->pop3_uidl);
mailbox_save_set_received_date(save_ctx, data->received_date, 0);
diff -r b48b63c1ccb8 -r 309362da6431 src/lda/main.c
--- a/src/lda/main.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/lda/main.c Fri Sep 24 19:40:02 2010 +0100
@@ -221,6 +221,7 @@
struct istream *input;
struct mailbox_transaction_context *t;
struct mailbox_header_lookup_ctx *headers_ctx;
+ const char *user_source = "";
void **sets;
uid_t process_euid;
bool stderr_rejection = FALSE;
@@ -319,10 +320,12 @@
home = getenv("HOME");
if (user != NULL && home != NULL) {
/* no need for a pw lookup */
+ user_source = "USER environment";
} else if ((pw = getpwuid(process_euid)) != NULL) {
user = t_strdup(pw->pw_name);
if (home == NULL)
env_put(t_strconcat("HOME=", pw->pw_dir, NULL));
+ user_source = "passwd lookup for process euid";
} else if (user == NULL) {
i_fatal_status(EX_USAGE,
"Couldn't lookup our username (uid=%s)",
@@ -356,6 +359,11 @@
#endif
ctx.set = mail_storage_service_user_get_set(service_user)[1];
+ if (ctx.dest_user->mail_debug && *user_source != '\0') {
+ i_debug("userdb lookup skipped, username taken from %s",
+ user_source);
+ }
+
/* create a separate mail user for the internal namespace */
sets = master_service_settings_get_others(master_service);
raw_mail_user = mail_user_alloc(user, ctx.dest_user->set_info, sets[0]);
diff -r b48b63c1ccb8 -r 309362da6431 src/lib-auth/auth-client-request.c
--- a/src/lib-auth/auth-client-request.c Thu Sep 16 19:19:41 2010 +0100
+++ b/src/lib-auth/auth-client-request.c Fri Sep 24 19:40:02 2010 +0100
@@ -112,19 +112,26 @@
i_error("Error sending continue request to auth server: %m");
}
+static void call_callback(struct auth_client_request *request,
+ enum auth_request_status status,
+ const char *data_base64,
+ const char *const *args)
+{
+ auth_request_callback_t *callback = request->callback;
+
+ if (status != AUTH_REQUEST_STATUS_CONTINUE)
+ request->callback = NULL;
+ callback(request, status, data_base64, args, request->context);
+}
+
void auth_client_request_abort(struct auth_client_request **_request)
{
struct auth_client_request *request = *_request;
- const char *str = t_strdup_printf("CANCEL\t%u\n", request->id);
*_request = NULL;
- if (o_stream_send_str(request->conn->output, str) < 0)
- i_error("Error sending request to auth server: %m");
-
- request->callback(request, AUTH_REQUEST_STATUS_FAIL, NULL, NULL,
- request->context);
- request->callback = NULL;
+ auth_client_send_cancel(request->conn->client, request->id);
+ call_callback(request, AUTH_REQUEST_STATUS_FAIL, NULL, NULL);
}
unsigned int auth_client_request_get_id(struct auth_client_request *request)
@@ -176,7 +183,7 @@
break;
}
More information about the dovecot-cvs
mailing list