Matthew,

reading the rfc I've concluded you were just about on target. Apart from
the no-headers case returning a '{2}\r\n\r\n' I've started adding '\r\n'
to each string returned by said function.

Matthew Sayler wrote:
> Hello,
> 
> I have some strage messages in my mailspool.  Qmail is perfectly happy
> to accept messages without such commonly used fields as To and From, and
> as a result Thunderbird pukes when it asks for its usual set of
> headers and gets a NIL back.  That's a bug in Thunderbird, but dbmail
> is not wholly innocent..
> 
> Attached is a small patch to return a blank line instead of NIL on these
> queries.  Reading RFC 3501 6.4.5., I think we should return the blank
> header line on all HEADER* subqueries--which would mean a change to
> imap_message_fetch_headers.  Unfortunately this is used in a enough
> places that I'm not sure that changing it won't break something else --
> hence the minimal patch.  With this patch, TBird can read my 90k mailbox
> without problems.
> 
> A quick test of Courier IMAP shows that it always adds the extra line
> (and thus never returns NIL)
> 
> 4 FETCH 5 (BODY.PEEK[HEADER.FIELDS(adfgadfgadfg)])
> * 5 FETCH (BODY[HEADER.FIELDS ("adfgadfgadfg")] {2}
> 
> )
> 
> Comments?
> 
> Matt
> 
> 
> ------------------------------------------------------------------------
> 
> Index: dbmail-imapsession.c
> ===================================================================
> --- dbmail-imapsession.c        (revision 2029)
> +++ dbmail-imapsession.c        (working copy)
> @@ -961,7 +961,7 @@
>                 tmpdumpsize=0;
>  
>                 if (!tmp) {
> -                       dbmail_imap_session_printf(self, "NIL");
> +                       dbmail_imap_session_printf(self, "{2}\r\n\r\n");
>                 } else {
>                         ts = g_string_new(tmp);
>                         g_free(tmp);
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dbmail-dev mailing list
> [email protected]
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl

Reply via email to