On Sun, Mar 06, 2005 at 01:38:14PM +0100, Andreas Aardal Hanssen wrote:
> Hi, everyone.
> 
> Here follows an update on what's happening on the Binc IMAP front. :-)

Many thanks for your hard work on Binc, Andreas!


> Binc IMAP has certainly matured into quite a stable, production
> ready server.

Indeed it has. It's great!

[..]

I think the plans you outline look great and it will be exciting to
see when the server becomes feature-complete enough to really take
over the world, muahaha. :)


> So happy IMAPing everyone!

I found a bug, in the INTERNALDATE reply.
>From the -news release posting, I quote:

- The time zone is now removed from the greeting if strftime fails (if
  the time zone is not set, for example). %Z is used instead of %z, to
  avoid text time zones ("GMT" becomes "+0100").

.. and in operator-fetch.cc %Z is also used for the INTERNALDATE
reply.

However, my Linux strftime() manpage says:
--8<--
%z  The time-zone  as  hour  offset  from  GMT.   Required to  emit
    RFC822-conformant  dates  (using  "%a,  %d  %b %Y %H:%M:%S %z").
    (GNU)

%Z  The time zone or name or abbreviation.
-->8--

%Z = zone or name or abbreviation
%z = hour offset (GNU extension)

On a MacOS X system near me there is neither %Z nor %z, but instead
           long tm_gmtoff; /* offset from UTC in seconds */
in struct tm.

Finally,

--8<-- RFC2683, line 588
In particular, note that the string in the INTERNALDATE response is
NOT an RFC-822 date string - that is, it is not in the same format as
the first string in the ENVELOPE response.  Since most clients will,
in fact, accept an RFC-822 date string in the INTERNALDATE response,
it's easy to miss this in your interoperability testing.  But it will
cause a problem with some client, so be sure to generate the correct
string for this field.
-->8--

And this does indeed make at least IlohaMail show the incorrect date.
(After switching it to use internaldates that is, before that it just
shows 1970 with Binc - does anyone know why?)

The best solution I can think of is to use localtime() to find out
what the current local timezone is - since there seems to be no other
portable way.. Comments?


//Peter

Reply via email to