[Dovecot] Time zone problems with dovecot-1.0-stable (20050705 nightly snapshot)

Jon Roma roma at uiuc.edu
Tue Jul 12 20:23:08 EEST 2005


Timo Sirainen <tss at iki.fi> wrote:

> On Wed, 2005-07-06 at 17:43 -0500, Jon Roma wrote:
>> First a few words about my setup.  I'm running on AIX 5.1, with SSL
>> enabled.  I had to tweak the dovecot-1.0-stable source tree to get rid
>> of the "//"-style comments, since the AIX xlc compiler doesn't like that
>> construct.
>
> Yes, these kind of comments shouldn't be there. I've used them only for
> "temporary" FIXME-comments, so hopefully when they're all fixed there
> are no more // comments.. :)
>
>> And, as with the 0.99.14 build, there's tons of compiler
>> warnings about <sys/types.h>, but the applications build and seem to
>> generally work fine.
>
> What sys/types.h errors?

Oh, it's this fun stuff that appears for just about every .c file compiled:

gmake[3]: Entering directory 
`/usr/local/src/dovecot-1.0-stable-20050705/src/lib'
source='base64.c' object='base64.o' libtool=no \
DEPDIR=.deps depmode=aix /bin/sh ../../depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I../..   -I/usr/local/include  -g  -c base64.c
"/usr/include/sys/types.h", line 118.25: 1506-115 (E) Duplicate type 
specifier "unsigned" ignored.
"/usr/include/sys/types.h", line 118.1: 1506-137 (W) Declaration must 
declare at least one declarator, tag, or the members of an enumeration.
"/usr/include/sys/types.h", line 131.1: 1506-137 (W) Declaration must 
declare at least one declarator, tag, or the members of an enumeration.

Alas, I didn't see anything obvious that causes this, but as mentioned,
the executable seems to work fine -- it's just a very noisy compilation.
Since I don't know whether attachments to this list are appropriate, please
feel free to contact me directly and I'll send you the sys/types.h file
and any other information that would help.

>> IMAP command, UW-imapd gives me the correctly-localized time, while
>> dovecot gives me GMT.
>>
>> Incidentally, I've tried starting dovecot both with and without chroot
>> and even explicitly setting the TZ environment variable on startup,
>> both with no effect.
>
> Dovecot deletes the TZ environment (and everything else) before starting
> imap process. Doesn't AIX use something similar to /etc/localtime?

AIX uses TZ, but it has the unique behavior where some environment settings
are imported from /etc/environment.

> Try running imap binary manually, eg.:
>
> MAIL=~/Maildir /usr/local/libexec/dovecot/imap
>
> and give it the commands to fetch INTERNALDATE (and set TZ if needed?).
> If it works, maybe I'll start setting TZ for Dovecot's child processes.

It works right when I run the dovecot imap binary manually.  Here's
the transcript running with my normal TZ=CST6CDT environment:

28: MAIL=/var/imap/dovecot/roma /usr/local/libexec/dovecot/imap
* PREAUTH [CAPABILITY IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT 
LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS] Logged in as roma
a001 select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags 
permitted.
* 62 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1118339114] UIDs valid
* OK [UIDNEXT 414] Predicted next UID
a001 OK [READ-WRITE] Select completed.
a002 fetch 1 internaldate
* 1 FETCH (INTERNALDATE "09-Jul-2005 22:58:50 -0500")
a002 OK Fetch completed.

And with my TZ environment manually tweaked to North American Pacific Time:

29: TZ=PST8PDT MAIL=/var/imap/dovecot/roma /usr/local/libexec/dovecot/imap
* PREAUTH [CAPABILITY IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT 
LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS] Logged in as roma
a001 select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags 
permitted.
* 62 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1118339114] UIDs valid
* OK [UIDNEXT 414] Predicted next UID
a001 OK [READ-WRITE] Select completed.
a002 fetch 1 internaldate
* 1 FETCH (INTERNALDATE "09-Jul-2005 20:58:50 -0700")
a002 OK Fetch completed.

Thanks.





More information about the dovecot mailing list