Hi, I notice that in src/lib-mail/message-parser.c, there is a section of code that checks for the presence of MIME-Version before allowing processing of the Content-* headers. Is there a possibility of relaxing this rule? There are some broken mailers, in particular newsletter mailers that do not seem to honour the MIME-Version header, though they do send the Content-Type. Cheers.
On Wed, 2007-08-01 at 19:50 +0800, Tan Shao Yi wrote:> Hi, > > I notice that in src/lib-mail/message-parser.c, there is a section of > code that checks for the presence of MIME-Version before allowing > processing of the Content-* headers. > > Is there a possibility of relaxing this rule? There are some broken > mailers, in particular newsletter mailers that do not seem to honour the > MIME-Version header, though they do send the Content-Type.I suppose this could be changed. At least UW-IMAP also does that.. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070801/81cf1c90/attachment-0002.bin>
On Wed, August 1, 2007 9:51 am, Timo Sirainen <tss at iki.fi> said:> On Wed, 2007-08-01 at 19:50 +0800, Tan Shao Yi wrote: >> Hi, >> >> I notice that in src/lib-mail/message-parser.c, there is a section of >> code that checks for the presence of MIME-Version before allowing >> processing of the Content-* headers. >> >> Is there a possibility of relaxing this rule? There are some broken >> mailers, in particular newsletter mailers that do not seem to honour the >> MIME-Version header, though they do send the Content-Type. > > I suppose this could be changed. At least UW-IMAP also does that..Or at least make relaxing it an option in v1.1. I personally think it should be relaxed. Bill
On Wed, 1 Aug 2007, Bill Boebel wrote:> On Wed, August 1, 2007 9:51 am, Timo Sirainen <tss at iki.fi> said:> On Wed, 2007-08-01 at 19:50 +0800, Tan Shao Yi wrote: >> Hi, >> >> I notice that in src/lib-mail/message-parser.c, there is a section of >> code that checks for the presence of MIME-Version before allowing >> processing of the Content-* headers. >> >> Is there a possibility of relaxing this rule? There are some broken >> mailers, in particular newsletter mailers that do not seem to honour the >> MIME-Version header, though they do send the Content-Type. > > I suppose this could be changed. At least UW-IMAP also does that..Or at least make relaxing it an option in v1.1. I personally think it should be relaxed. Bill> >Hi Timo, Will it be possible to make this available in the 1.0 branch? UW-IMAP seems to continue to process e-mails without the MIME-Version, so long as it has the Content-Type or -Encoding header. Cheers.
On Wed, August 1, 2007 8:36 pm, Tan Shao Yi <tansy at pacific.net.sg> said:> Will it be possible to make this available in the 1.0 branch? UW-IMAP > seems to continue to process e-mails without the MIME-Version, so long as > it has the Content-Type or -Encoding header.It's an easy patch if you want to apply it to your installation. Probably something like this, although I haven't tried it... src/lib-mail/message-parser.c @225: - if (!hdr->eoh && strcasecmp(hdr->name, "Mime-Version") == 0) { + //if (!hdr->eoh && strcasecmp(hdr->name, "Mime-Version") == 0) { /* it's MIME. Content-* headers are valid */ part->flags |= MESSAGE_PART_FLAG_IS_MIME; - }