[Dovecot] Re: mail shown throught outlook, shows todays date
richs at whidbey.net
richs at whidbey.net
Thu Apr 27 23:54:30 EEST 2006
> bclark wrote:
>
> > The interesting thing is, once I have some mail on the dovecot,
> the date
> > displayed on Mozilla is correct, but the mail shown throught
> outlook,
> > shows todays date (thats for all mail).
>
> Each mail has (at least) two dates : the date it was sent (stored
> in the
> headers), and the date it arrived (in Maildir, the date of the
> file). Most
> likely, Mozilla and SquirrelMail are showing the date in the
> headers, and Outloo
> is showing the arrival date.
>
> This problem has come up a few times, I believe. As I recall, most
> mail clients
> allow you to select which date to sort by. If you can't find the
> option, it may
> be somewhere in this list's archives.
>
> > Almost seems as Outlook (office 2000) looks at the date / time
> stamp of
> > the file it self as opposed to opening and reading the mail and
> reading
> > the necassry tags.
>
> That's my assessment, also.
>
> > If anyone could help me understand this (is this a dovecot issue), I
> > would really appreciate it.
>
> I don't believe it's a dovecot issue, per se.
>
> --
> Curtis Maloney
> cmaloney <at> cardgate.net
I've been testing Dovecot 1.0beta7 to implement IMAP for the first
time, and have had a good experience so far.
But like Curtis and Brent, I found that Outlook and Outlook Express
display "incorrect" dates on messages uploaded via APPEND. That's
because they sort messages using INTERNALDATE:
wea3 SELECT "Test Folder"
pqng UID FETCH 1:* (UID FLAGS RFC822.SIZE BODY.PEEK[HEADER]
INTERNALDATE)
Some have created scripts to sync file timestamps with "Date"
headers, which conflicts with the concept of "INTERNALDATE". Others
ask users to add the "Date Sent" column, but those dates are only
revealed after a message is viewed.
I'd like to propose the attached patch to add an optional "outlook-
dates" IMAP workaround, which returns the message "Date:" even when
INTERNALDATE is specified.
Since "BODY.PEEK" is being called anyway, our tests didn't reveal any
performance impact. Can anyone think of a scenario this would
negatively impact? Another option might be to patch the APPEND function?
Thanks!
Rich Sandberg
richs at whidbey.net
-------------- next part --------------
? outlook-dates.patch
Index: src/imap/common.h
===================================================================
RCS file: /home/cvs/dovecot/src/imap/common.h,v
retrieving revision 1.22
diff -u -r1.22 common.h
--- src/imap/common.h 22 Jul 2005 14:20:44 -0000 1.22
+++ src/imap/common.h 27 Apr 2006 19:13:18 -0000
@@ -27,7 +27,8 @@
WORKAROUND_DELAY_NEWMAIL = 0x01,
WORKAROUND_OUTLOOK_IDLE = 0x02,
WORKAROUND_NETSCAPE_EOH = 0x04,
- WORKAROUND_TB_EXTRA_MAILBOX_SEP = 0x08
+ WORKAROUND_TB_EXTRA_MAILBOX_SEP = 0x08,
+ WORKAROUND_OUTLOOK_DATES = 0x10
};
extern struct ioloop *ioloop;
Index: src/imap/imap-fetch.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.43
diff -u -r1.43 imap-fetch.c
--- src/imap/imap-fetch.c 26 Feb 2006 11:24:35 -0000 1.43
+++ src/imap/imap-fetch.c 27 Apr 2006 19:13:19 -0000
@@ -482,7 +482,11 @@
{
time_t time;
- time = mail_get_received_date(mail);
+ if ((client_workarounds & WORKAROUND_OUTLOOK_DATES) != 0) {
+ time = mail_get_date(mail, NULL);
+ } else {
+ time = mail_get_received_date(mail);
+ }
if (time == (time_t)-1)
return -1;
Index: src/imap/main.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.76
diff -u -r1.76 main.c
--- src/imap/main.c 14 Apr 2006 18:21:00 -0000 1.76
+++ src/imap/main.c 27 Apr 2006 19:13:19 -0000
@@ -34,6 +34,7 @@
{ "outlook-idle", WORKAROUND_OUTLOOK_IDLE },
{ "netscape-eoh", WORKAROUND_NETSCAPE_EOH },
{ "tb-extra-mailbox-sep", WORKAROUND_TB_EXTRA_MAILBOX_SEP },
+ { "outlook-dates", WORKAROUND_OUTLOOK_DATES },
{ NULL, 0 }
};
-------------- next part --------------
More information about the dovecot
mailing list