[Dovecot] deliver and time
Hi All,
I've been experimenting with deliver on my personal domain, and so far everything has been peachy except for Mail.app. Mail.app (on multiple devices) is showing what looks to be GMT times, rather than the date header. Initially I thought it was something I did on my Mac, until I got an Ipad to test with - and never connected it to my Mac - and had the same time issue.
It seems Mail.app uses the timestamp ('arrived date'?) on the mail file itself (Maildir here) to display the time.
So.. I have dovecot 1.2.10 installed on top of vpopmail (multiple MXs, delivering to OpenSolaris NFS share via tcp), and it seems that deliver is using the GMT time when writing the Maildir file, and vdelivermail just uses the adjusted time.. Or maybe it just allows the OS to write the timestamp.
Either way, is this a known issue with deliver - or is there a patch? I don't recall ever seeing it come up on the list, and I'm not seeing anything in the changelog.
Rick
On 04/10/10 20:19, Rick Romero wrote:
Hi All,
I've been experimenting with deliver on my personal domain, and so far everything has been peachy except for Mail.app. Mail.app (on multiple devices) is showing what looks to be GMT times, rather than the date header. Initially I thought it was something I did on my Mac, until I got an Ipad to test with - and never connected it to my Mac - and had the same time issue.
It seems Mail.app uses the timestamp ('arrived date'?) on the mail file itself (Maildir here) to display the time.
So.. I have dovecot 1.2.10 installed on top of vpopmail (multiple MXs, delivering to OpenSolaris NFS share via tcp), and it seems that deliver is using the GMT time when writing the Maildir file, and vdelivermail just uses the adjusted time.. Or maybe it just allows the OS to write the timestamp.
When your MUA accesses the mail over IMAP, it does not see the Maildir file's mtime. Your MUA should use the Date header in the e-mail, or the date/time when it first sees the message (f.i. when not Date header is available). Failing to do so can only be a client issue. Not using the timezone you set up in your profile or environment also sounds like a OS/client issue.
How do messsages that display this issue look in another MUA with IMAP access?
-- Regards, Tom
On 4.10.2010, at 19.53, Tom Hendrikx wrote:
It seems Mail.app uses the timestamp ('arrived date'?) on the mail file itself (Maildir here) to display the time.
When your MUA accesses the mail over IMAP, it does not see the Maildir file's mtime. Your MUA should use the Date header in the e-mail, or the date/time when it first sees the message (f.i. when not Date header is available).
IMAP protocol has a concept of "INTERNALDATE", which contains the time when the message was received. With Maildir it's the same as the file's mtime.
With Mail.app you can configure it to show/sort messages by "Date Received" (=INTERNALDATE) or "Date Sent" (=Date: header). I prefer the "Date Received" so that a bad Date: header won't put the mail in the middle of the mailbox.
On 10/4/2010 2:15 PM, Timo Sirainen wrote:
On 4.10.2010, at 19.53, Tom Hendrikx wrote:
It seems Mail.app uses the timestamp ('arrived date'?) on the mail file itself (Maildir here) to display the time.
When your MUA accesses the mail over IMAP, it does not see the Maildir file's mtime. Your MUA should use the Date header in the e-mail, or the date/time when it first sees the message (f.i. when not Date header is available). IMAP protocol has a concept of "INTERNALDATE", which contains the time when the message was received. With Maildir it's the same as the file's mtime.
With Mail.app you can configure it to show/sort messages by "Date Received" (=INTERNALDATE) or "Date Sent" (=Date: header). I prefer the "Date Received" so that a bad Date: header won't put the mail in the middle of the mailbox.
That's it exactly - the odd thing is that when 'deliver' drops a message in the mailbox, it uses GMT. When I use vdelivermail, time is GMT -0500.
Here's an ls -la of my new/ directory, you can see where I changed to vdelivermail, then back to deliver. -rw------- 2 vpopmail vchkpw 30963 Oct 4 17:58 1286215128.M313112P44778.mx.myhost.net,S=30963,W=31528:2,ST -rw------- 2 vpopmail vchkpw 6522 Oct 4 17:59 1286215163.M989313P13015.www51.myhost.net,S=6522,W=6653:2,ST -rw------- 1 vpopmail vchkpw 1536 Oct 4 13:00 1286215228.45853.mx.myhost.net,S=1536:2,S -rw------- 2 vpopmail vchkpw 59740 Oct 4 13:03 1286215329.78288.random.myhost.net,S=59740:2,ST -rw------- 1 vpopmail vchkpw 1412 Oct 4 18:04 1286215469.M717887P50916.mx.myhost.net,S=1412,W=1441:2,S -rw------- 2 vpopmail vchkpw 2895 Oct 4 18:06 1286215577.M668341P79422.random.myhost.net,S=2895,W=2964:2,ST
What I don't understand is why the timestamp would be different with deliver. What's odd is that the time in the filename itself appears correct. Weird.
I'm calling deliver from procmail like so: #|/usr/bin/env -i HOME=$DOMDIR /usr/local/libexec/dovecot/deliver
On 4.10.2010, at 20.35, Rick Romero wrote:
What I don't understand is why the timestamp would be different with deliver. What's odd is that the time in the filename itself appears correct. Weird.
I'm calling deliver from procmail like so: #|/usr/bin/env -i HOME=$DOMDIR /usr/local/libexec/dovecot/deliver
deliver doesn't change the file's mtime, it just uses whatever time OS assigns it (or NFS server). I don't know if vdelivermail explicitly changes it. You could strace both and grep for "utime" from the output. And you could check what the timestamp is if you simply do "echo > foo" in the NFS mount.
On 10/4/2010 2:53 PM, Timo Sirainen wrote:
On 4.10.2010, at 20.35, Rick Romero wrote:
What I don't understand is why the timestamp would be different with deliver. What's odd is that the time in the filename itself appears correct. Weird.
I'm calling deliver from procmail like so: #|/usr/bin/env -i HOME=$DOMDIR /usr/local/libexec/dovecot/deliver deliver doesn't change the file's mtime, it just uses whatever time OS assigns it (or NFS server). I don't know if vdelivermail explicitly changes it. You could strace both and grep for "utime" from the output. And you could check what the timestamp is if you simply do "echo> foo" in the NFS mount.
I already 'touched' a file, and it looked fine, and for giggles I did what you suggested and the times are correct. Only using 'deliver' results in a GMT time.
I just tried it from the command line - and from command line the time is written correctly, but not when called from procmail. *sigh*
Thanks
On 4.10.2010, at 22.14, Rick Romero wrote:
I already 'touched' a file, and it looked fine, and for giggles I did what you suggested and the times are correct. Only using 'deliver' results in a GMT time.
Could TZ environment affect it? I wouldn't think so, but that's the only thing I can think of right now (besides stracing).
On Oct 4, 2010, at 4:28 PM, Timo Sirainen tss@iki.fi wrote:
On 4.10.2010, at 22.14, Rick Romero wrote:
I already 'touched' a file, and it looked fine, and for giggles I did what you suggested and the times are correct. Only using 'deliver' results in a GMT time.
Could TZ environment affect it? I wouldn't think so, but that's the only thing I can think of right now (besides stracing).
Good call! I added that env variable (TZ=CST for me) to my deliver line and all is well now. Funny, I could never find the option in mail.app to use the date field in the email. At least now when I change over to deliver, the time displayed will be consistent for anyone like me who can't find the option.
Thanks Timo
Rick
On 5.10.2010, at 2.06, Rick Romero wrote:
Could TZ environment affect it? I wouldn't think so, but that's the only thing I can think of right now (besides stracing).
Good call! I added that env variable (TZ=CST for me) to my deliver line and all is well now.
Weird. I don't think it should affect it.
Funny, I could never find the option in mail.app to use the date field in the email.
Ctrl-click the From/Subject/Date-received box thing above the list of messages.
On 10/04/2010 02:19 PM, Rick Romero wrote:
Hi All,
I've been experimenting with deliver on my personal domain, and so far everything has been peachy except for Mail.app. Mail.app (on multiple devices) is showing what looks to be GMT times, rather than the date header. Initially I thought it was something I did on my Mac, until I got an Ipad to test with - and never connected it to my Mac - and had the same time issue.
It seems Mail.app uses the timestamp ('arrived date'?) on the mail file itself (Maildir here) to display the time.
So.. I have dovecot 1.2.10 installed on top of vpopmail (multiple MXs, delivering to OpenSolaris NFS share via tcp), and it seems that deliver is using the GMT time when writing the Maildir file, and vdelivermail just uses the adjusted time.. Or maybe it just allows the OS to write the timestamp.
Either way, is this a known issue with deliver - or is there a patch? I don't recall ever seeing it come up on the list, and I'm not seeing anything in the changelog.
Your mail client doesn't even know that a Maildir file exists. Can you post the headers of the message, along with the expected/actual results?
(My guess would be that Mail.app thinks you live in Greenwich.)
participants (4)
-
Michael Orlitzky
-
Rick Romero
-
Timo Sirainen
-
Tom Hendrikx