Re: [Dovecot] SORT(DATE) and missing Date headers

2007-10-02 Thread Kyle Wheeler
On Tuesday, October 2 at 09:49 AM, quoth Kyle Wheeler: Aha! That's perfect! (and so simple!) If anyone in the future is interested in the code for this, here's what I did that works for me. This goes in all three places that mail_get_date() is used in the code: I put up a patch for this (an

Re: [Dovecot] SORT(DATE) and missing Date headers

2007-10-02 Thread Kyle Wheeler
On Tuesday, September 25 at 06:26 PM, quoth Timo Sirainen: That's not *quite* what I meant. ARRIVAL is "when did this mail get here", while DATE is supposed to be "when was this mail sent". My thought here is that "when was this mail sent" can be approximated in the absence of a Date header by

Re: [Dovecot] SORT(DATE) and missing Date headers

2007-09-25 Thread Timo Sirainen
On Tue, 2007-09-25 at 09:58 -0500, Kyle Wheeler wrote: > On Tuesday, September 25 at 12:39 PM, quoth Timo Sirainen: > >> How hard would this be to hack into the current Dovecot source? > > > >Replace mail_get_date() calls in src/imap/imap-sort.c with something > >like: > > > >t = mail_get_date(..);

Re: [Dovecot] SORT(DATE) and missing Date headers

2007-09-25 Thread Kyle Wheeler
On Tuesday, September 25 at 12:39 PM, quoth Timo Sirainen: How hard would this be to hack into the current Dovecot source? Replace mail_get_date() calls in src/imap/imap-sort.c with something like: t = mail_get_date(..); if (t == (time_t)-1) t = mail_get_received_date(..); That's not *quite*

Re: [Dovecot] SORT(DATE) and missing Date headers

2007-09-25 Thread Timo Sirainen
On Mon, 2007-09-24 at 14:38 -0500, Kyle Wheeler wrote: > Would it be possible to get Dovecot to fall back to Received > header parsing whenever a message is missing a Date header? The idea > is that SORT (DATE) would then become useful even in the face of > commonly malformed email. Unfortunate

Re: [Dovecot] SORT(DATE) and missing Date headers

2007-09-24 Thread Kyle Wheeler
On Monday, September 24 at 04:19 PM, quoth Rich at Whidbey Telecom: We recently encountered this with a new VOIP voicemail system. However, using Thunderbird at least, the time the message file was written is used (probably using "INTERNALDATE"). This might only apply if you're using Maildir'

Re: [Dovecot] SORT(DATE) and missing Date headers

2007-09-24 Thread Rich at Whidbey Telecom
We recently encountered this with a new VOIP voicemail system. However, using Thunderbird at least, the time the message file was written is used (probably using "INTERNALDATE"). This might only apply if you're using Maildir's, but it shows that the behavior you're seeing might be specific to

[Dovecot] SORT(DATE) and missing Date headers

2007-09-24 Thread Kyle Wheeler
Hello, Occasionally, I get mail that's missing a Date header. The usual suspects are iTunes weekly mailings and NYTimes email-to-a-friend articles. I use qmail, which doesn't "fix" these malformed emails by adding a Date header (like Sendmail does), so when they get to my mailbox, they're jus