dovecot-2.2: pop3c: Added pop3c_quick_received_date setting.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Dec 19 04:06:01 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/970ffc20b8a0
changeset: 17067:970ffc20b8a0
user: Timo Sirainen <tss at iki.fi>
date: Thu Dec 19 04:05:52 2013 +0200
description:
pop3c: Added pop3c_quick_received_date setting.
With this enabled dsync no longer requires calling TOP for each message to
get the metadata.
diffstat:
src/lib-storage/index/pop3c/pop3c-mail.c | 8 ++++++++
src/lib-storage/index/pop3c/pop3c-settings.c | 4 +++-
src/lib-storage/index/pop3c/pop3c-settings.h | 1 +
3 files changed, 12 insertions(+), 1 deletions(-)
diffs (58 lines):
diff -r a56ef53bd3ce -r 970ffc20b8a0 src/lib-storage/index/pop3c/pop3c-mail.c
--- a/src/lib-storage/index/pop3c/pop3c-mail.c Thu Dec 19 04:01:58 2013 +0200
+++ b/src/lib-storage/index/pop3c/pop3c-mail.c Thu Dec 19 04:05:52 2013 +0200
@@ -4,14 +4,22 @@
#include "ioloop.h"
#include "istream.h"
#include "index-mail.h"
+#include "pop3c-settings.h"
#include "pop3c-client.h"
#include "pop3c-sync.h"
#include "pop3c-storage.h"
static int pop3c_mail_get_received_date(struct mail *_mail, time_t *date_r)
{
+ struct pop3c_mailbox *mbox = (struct pop3c_mailbox *)_mail->box;
int tz;
+ if (mbox->storage->set->pop3c_quick_received_date) {
+ /* we don't care about the date, just return the current date */
+ *date_r = ioloop_time;
+ return 0;
+ }
+
/* FIXME: we could also parse the first Received: header and get
the date from there, but since this code is unlikely to be called
except during migration, I don't think it really matters. */
diff -r a56ef53bd3ce -r 970ffc20b8a0 src/lib-storage/index/pop3c/pop3c-settings.c
--- a/src/lib-storage/index/pop3c/pop3c-settings.c Thu Dec 19 04:01:58 2013 +0200
+++ b/src/lib-storage/index/pop3c/pop3c-settings.c Thu Dec 19 04:05:52 2013 +0200
@@ -25,6 +25,7 @@
DEF(SET_BOOL, pop3c_ssl_verify),
DEF(SET_STR, pop3c_rawlog_dir),
+ DEF(SET_BOOL, pop3c_quick_received_date),
SETTING_DEFINE_LIST_END
};
@@ -40,7 +41,8 @@
.pop3c_ssl = "no:pop3s:starttls",
.pop3c_ssl_verify = TRUE,
- .pop3c_rawlog_dir = ""
+ .pop3c_rawlog_dir = "",
+ .pop3c_quick_received_date = FALSE
};
static const struct setting_parser_info pop3c_setting_parser_info = {
diff -r a56ef53bd3ce -r 970ffc20b8a0 src/lib-storage/index/pop3c/pop3c-settings.h
--- a/src/lib-storage/index/pop3c/pop3c-settings.h Thu Dec 19 04:01:58 2013 +0200
+++ b/src/lib-storage/index/pop3c/pop3c-settings.h Thu Dec 19 04:05:52 2013 +0200
@@ -13,6 +13,7 @@
bool pop3c_ssl_verify;
const char *pop3c_rawlog_dir;
+ bool pop3c_quick_received_date;
};
const struct setting_parser_info *pop3c_get_setting_parser_info(void);
More information about the dovecot-cvs
mailing list