Piotr Wadas wrote: > > The question is where to find a query to modify, to avoid filtering dump > through a regex :) > Regards, > DT
Piotr, the code involved is in src/dbmail-mailbox.c around line 353 try attached patch. -- ________________________________________________________________ Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands________________________________http://www.nfg.nl
>From 5ccf723b3381baee1f93ea806235d10b3d810dda Mon Sep 17 00:00:00 2001 From: Paul J Stevens <[email protected]> Date: Tue, 17 Nov 2009 11:37:14 +0100 Subject: [PATCH] fix From_ header date during export --- src/dbmail-mailbox.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/src/dbmail-mailbox.c b/src/dbmail-mailbox.c index 7227214..43c67f9 100644 --- a/src/dbmail-mailbox.c +++ b/src/dbmail-mailbox.c @@ -321,6 +321,20 @@ int dbmail_mailbox_insert_uid(DbmailMailbox *self, u64_t id) } #define FROM_STANDARD_DATE "Tue Oct 11 13:06:24 2005" +static gchar * _message_get_envelope_date(const DbmailMessage *self) +{ + char *res; + struct tm gmt; + assert(self->internal_date); + + res = g_new0(char, TIMESTRING_SIZE+1); + memset(&gmt,'\0', sizeof(struct tm)); + gmtime_r(&self->internal_date, &gmt); + + strftime(res, TIMESTRING_SIZE, "%a %b %d %H:%M:%S %Y", &gmt); + return res; +} + static size_t dump_message_to_stream(DbmailMessage *message, GMimeStream *ostream) { @@ -350,7 +364,7 @@ static size_t dump_message_to_stream(DbmailMessage *message, GMimeStream *ostrea } g_object_unref(ialist); - d = dbmail_message_get_internal_date(message, 0); + d = _message_get_envelope_date(message); date = g_string_new(d); g_free(d); if (date->len < 1) -- 1.6.3.3
_______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
