[Dovecot] Possible header parsing problem

Eric Stadtherr estadtherr at gmail.com
Thu Oct 23 05:59:45 EEST 2008


Hi,

I ran into a problem wherein my mail client (RoundCube) would not 
display a message from a Dovecot IMAP server (claiming that the message 
had no content). The raw source of the message looked fine, but the body 
structure returned by Dovecot only had the first text/plain part and not 
the alternative text/html part. The message looks like:

    ... headers removed ...
    X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004
    Message-ID: <...>
    From: user at host.domain
    Date: Mon, 20 Oct 2008 14:15:55 -0600
    Content-Type: multipart/alternative; boundary="=_alternative
      006F3A73872574E8_="

    This is a multipart message in MIME format.
    --=_alternative 006F3A73872574E8_=
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain;
      charset=us-ascii

    blah blah blah

    --=_alternative 006F3A73872574E8_=
    Content-Transfer-Encoding: 7bit
    Content-Type: text/html;
      charset=us-ascii


    <br><font size=2 face="sans-serif">blah blah blah in HTML</font>

    --=_alternative 006F3A73872574E8_=--


I did a little bit of tracing through the parsing code 
(message-header-parser.c:message_parse_header_next()) and it appeared 
that the boundary in the Content-Type header was not parsed correctly, 
evidently because the header line was folded in the middle of the 
boundary string. RFC 822 appears to allow folding in a quoted string 
like this (§3.3 "quoted-string"), so I'm curious whether the parsing is 
working correctly.

Thanks for your help!

Here is my Dovecot information:
version: 1.1.4
"dovecot -n" output:
# 1.1.4: /usr/local/etc/dovecot.conf
Warning: fd limit 256 is lower than what Dovecot can use under full load 
(more than 384). Either grow the limit or change 
login_max_processes_count and max_mail_processes settings
base_dir: /var/dovecot/
info_log_path: /var/log/dovecot.log
listen: *, [::]
ssl_cert_file: /System/Library/OpenSSL/certs/imapd.pem
ssl_key_file: /System/Library/OpenSSL/certs/privkey.out
login_dir: /var/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
max_mail_processes: 256
mail_location: maildir:%h/Maildir
namespace:
   type: private
   separator: /
   inbox: yes
   list: yes
   subscriptions: yes
namespace:
   type: shared
   separator: /
   prefix: Shared/
   location: maildir:/Users/Shared/Maildir
   list: yes
   subscriptions: yes
auth default:
   passdb:
     driver: pam
     args: imap
   userdb:
     driver: passwd



-- 
*Eric Stadtherr*
estadtherr at gmail.com <mailto:estadtherr at gmail.com>


More information about the dovecot mailing list