Fwd: IMAP error reported by server. Invalid body section.

2012-07-23 Thread Rodrigo Abantes Antunes

Any news on this?

- Mensagem encaminhada de Rodrigo Abantes Antunes  
rodrigoantu...@pelotas.ifsul.edu.br -

   Data: Wed, 20 Jun 2012 18:20:50 -0300
 De: Rodrigo Abantes Antunes rodrigoantu...@pelotas.ifsul.edu.br
Assunto: IMAP error reported by server. Invalid body section.
   Para: info-cyrus@lists.andrew.cmu.edu

Hi, I use horde webmail and I thought my problem was related to horde
but like they said it isn't, it's something to do with cyrus, I'd like
your help to discover what could I do to solve this. My problem is
described here:

http://bugs.horde.org/ticket/11223

Thanks.

--
Rodrigo Abrantes Antunes
Técnico em Tecnologia da Informação
Coordenadoria de Manutenção e Redes
Instituto Federal Sul-rio-grandense - Campus Pelotas

- Final da mensagem encaminhada -

---BeginMessage---

Hi, I use horde webmail and I thought my problem was related to horde
but like they said it isn't, it's something to do with cyrus, I'd like
your help to discover what could I do to solve this. My problem is
described here:

http://bugs.horde.org/ticket/11223

Thanks.

--
Rodrigo Abrantes Antunes
Técnico em Tecnologia da Informação
Coordenadoria de Manutenção e Redes
Instituto Federal Sul-rio-grandense - Campus Pelotas




---End Message---

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: IMAP error reported by server. Invalid body section.

2012-06-25 Thread Rodrigo Abantes Antunes
In case you want to know my cyrus verion is 2.2. Just an update: I  
configured the same horde 4 installation to use yahoo servers and then  
forwarded the message to my yahoo mail and watched in horde, the image  
showed up normally.

-- 
Rodrigo Abrantes Antunes
Técnico em Tecnologia da Informação
Coordenadoria de Manutenção e Redes
Instituto Federal Sul-rio-grandense - Campus Pelotas



Quoting Simon Matter simon.mat...@invoca.ch:

 On Jun 22, 2012, at 5:10 PM, Simon Matter simon.mat...@invoca.ch wrote:

 On 06/22/2012 09:43 AM, Dave McMurtrie wrote:
 On 06/22/2012 06:35 AM, Adam Tauno Williams wrote:
 On Thu, 2012-06-21 at 13:07 -0300, Rodrigo Abantes Antunes wrote:
 The source from horde3 is exactly the same as horde4

 That is expected.  It isn't the message but the interpretation of the
 message.  These evil messages contain many named parts separated by a
 boundry (the boundry value is declared in the header of the message).
 Then parts of a message can refer to other parts of the message.  So
 either H4 can't correctly [or incorrectly!] parse the message into
 parts
 by boundry or one part references another part that isn't found.

 It would be useful to ask this question on the Horde / IMP mail list.

 I think this originated as a bug report to Horde and they think it's
 the
 IMAP server's fault.

 Rodrigo, can you forward the message to me?

 Hi.  Rodrigo sent me the message.  I wanted to confirm that the MIME
 structure was correct so I used munpack which was able to successfully
 unpack all the message parts.  This isn't a guarantee that the MIME
 structure is correct, but at the very least I can't definitely say the
 message is malformed.

 I then imported the message into my mailstore.  reconstruct was not
 pleased with it from the start:

 Jun 22 15:29:48 cyrusbe-d04 reconstruct[28021]: ERROR: message has more
 than 1000 header lines, not caching any more

 I did the same test on my box and reconstruct worked fine and I can view
 the message with Squirrelmail and Thunderbird without any problems.

 What's your version of cyrus-imapd you tested with? I have tested with a
 2.4.16 server.


 Interesting.  The server I'm testing on isn't a released version, but
 rather a snapshot build from the caldav-2.4 Git branch.  It should be

 Without looking at it closely, I have two things in my setup which could
 make the difference?

 1) I have set lmtp_strict_rfc2821: 0

 2) I have this patch:
 --- cyrus-imapd-2.3.7/imap/message.c2006-10-28 22:18:08.0 +0200
 +++ cyrus-imapd-2.3.7/imap/message.c.nobarenewlinescheck2006-10-28
 22:21:55.0 +0200
 @@ -256,8 +256,9 @@
 r = IMAP_MESSAGE_CONTAINSNULL;
 }
 else if (*p == '\n') {
 -   if (!sawcr  (inheader || !allow_null))
 -   r = IMAP_MESSAGE_CONTAINSNL;
 +   /* Do *NOT* check for RFC compliant line breaks (bare
 newlines) */
 +   /* if (!sawcr  (inheader || !allow_null))
 +   r = IMAP_MESSAGE_CONTAINSNL; */
 sawcr = 0;
 if (blankline) {
 inheader = 0;


 Regards,
 Simon

 fairly close to 2.4.16.  Can you grab telemetry and see what
 Squirrelmail/tbird is requesting?


 
 Cyrus Home Page: http://www.cyrusimap.org/
 List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
 To Unsubscribe:
 https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus




Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: IMAP error reported by server. Invalid body section.

2012-06-23 Thread Simon Matter
 On Jun 22, 2012, at 5:10 PM, Simon Matter simon.mat...@invoca.ch wrote:

 On 06/22/2012 09:43 AM, Dave McMurtrie wrote:
 On 06/22/2012 06:35 AM, Adam Tauno Williams wrote:
 On Thu, 2012-06-21 at 13:07 -0300, Rodrigo Abantes Antunes wrote:
 The source from horde3 is exactly the same as horde4

 That is expected.  It isn't the message but the interpretation of the
 message.  These evil messages contain many named parts separated by a
 boundry (the boundry value is declared in the header of the message).
 Then parts of a message can refer to other parts of the message.  So
 either H4 can't correctly [or incorrectly!] parse the message into
 parts
 by boundry or one part references another part that isn't found.

 It would be useful to ask this question on the Horde / IMP mail list.

 I think this originated as a bug report to Horde and they think it's
 the
 IMAP server's fault.

 Rodrigo, can you forward the message to me?

 Hi.  Rodrigo sent me the message.  I wanted to confirm that the MIME
 structure was correct so I used munpack which was able to successfully
 unpack all the message parts.  This isn't a guarantee that the MIME
 structure is correct, but at the very least I can't definitely say the
 message is malformed.

 I then imported the message into my mailstore.  reconstruct was not
 pleased with it from the start:

 Jun 22 15:29:48 cyrusbe-d04 reconstruct[28021]: ERROR: message has more
 than 1000 header lines, not caching any more

 I did the same test on my box and reconstruct worked fine and I can view
 the message with Squirrelmail and Thunderbird without any problems.

 What's your version of cyrus-imapd you tested with? I have tested with a
 2.4.16 server.


 Interesting.  The server I'm testing on isn't a released version, but
 rather a snapshot build from the caldav-2.4 Git branch.  It should be

Without looking at it closely, I have two things in my setup which could
make the difference?

1) I have set lmtp_strict_rfc2821: 0

2) I have this patch:
--- cyrus-imapd-2.3.7/imap/message.c2006-10-28 22:18:08.0 +0200
+++ cyrus-imapd-2.3.7/imap/message.c.nobarenewlinescheck2006-10-28
22:21:55.0 +0200
@@ -256,8 +256,9 @@
r = IMAP_MESSAGE_CONTAINSNULL;
}
else if (*p == '\n') {
-   if (!sawcr  (inheader || !allow_null))
-   r = IMAP_MESSAGE_CONTAINSNL;
+   /* Do *NOT* check for RFC compliant line breaks (bare
newlines) */
+   /* if (!sawcr  (inheader || !allow_null))
+   r = IMAP_MESSAGE_CONTAINSNL; */
sawcr = 0;
if (blankline) {
inheader = 0;


Regards,
Simon

 fairly close to 2.4.16.  Can you grab telemetry and see what
 Squirrelmail/tbird is requesting?



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: IMAP error reported by server. Invalid body section.

2012-06-22 Thread Adam Tauno Williams
On Thu, 2012-06-21 at 13:07 -0300, Rodrigo Abantes Antunes wrote:
 The source from horde3 is exactly the same as horde4

That is expected.  It isn't the message but the interpretation of the
message.  These evil messages contain many named parts separated by a
boundry (the boundry value is declared in the header of the message).
Then parts of a message can refer to other parts of the message.  So
either H4 can't correctly [or incorrectly!] parse the message into parts
by boundry or one part references another part that isn't found.

It would be useful to ask this question on the Horde / IMP mail list.

  and I think all  
 the message parts are there, at least there is a body/body. If you  
 want I can forward you the message to your personal mail.

It isn't body stuff but the parts of the message as they are referred
to in the HTML.


signature.asc
Description: This is a digitally signed message part

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: IMAP error reported by server. Invalid body section.

2012-06-22 Thread Dave McMurtrie
On 06/22/2012 06:35 AM, Adam Tauno Williams wrote:
 On Thu, 2012-06-21 at 13:07 -0300, Rodrigo Abantes Antunes wrote:
 The source from horde3 is exactly the same as horde4

 That is expected.  It isn't the message but the interpretation of the
 message.  These evil messages contain many named parts separated by a
 boundry (the boundry value is declared in the header of the message).
 Then parts of a message can refer to other parts of the message.  So
 either H4 can't correctly [or incorrectly!] parse the message into parts
 by boundry or one part references another part that isn't found.

 It would be useful to ask this question on the Horde / IMP mail list.

I think this originated as a bug report to Horde and they think it's the 
IMAP server's fault.

Rodrigo, can you forward the message to me?

Thanks,

Dave

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: IMAP error reported by server. Invalid body section.

2012-06-22 Thread Dave McMurtrie
On 06/22/2012 09:43 AM, Dave McMurtrie wrote:
 On 06/22/2012 06:35 AM, Adam Tauno Williams wrote:
 On Thu, 2012-06-21 at 13:07 -0300, Rodrigo Abantes Antunes wrote:
 The source from horde3 is exactly the same as horde4

 That is expected.  It isn't the message but the interpretation of the
 message.  These evil messages contain many named parts separated by a
 boundry (the boundry value is declared in the header of the message).
 Then parts of a message can refer to other parts of the message.  So
 either H4 can't correctly [or incorrectly!] parse the message into parts
 by boundry or one part references another part that isn't found.

 It would be useful to ask this question on the Horde / IMP mail list.

 I think this originated as a bug report to Horde and they think it's the
 IMAP server's fault.

 Rodrigo, can you forward the message to me?

Hi.  Rodrigo sent me the message.  I wanted to confirm that the MIME 
structure was correct so I used munpack which was able to successfully 
unpack all the message parts.  This isn't a guarantee that the MIME 
structure is correct, but at the very least I can't definitely say the 
message is malformed.

I then imported the message into my mailstore.  reconstruct was not 
pleased with it from the start:

Jun 22 15:29:48 cyrusbe-d04 reconstruct[28021]: ERROR: message has more 
than 1000 header lines, not caching any more

I tried reading the message with Squirrelmail and that fails.  It does 2 
FETCH operations.  First:

A009 UID Fetch 1 (FLAGS UID RFC822.SIZE INTERNALDATE 
BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Importance 
Priority Cont
ent-Type)])

I'll sanitize the response to protect people's email addresses:

* 1 FETCH (FLAGS (\Seen) UID 1 INTERNALDATE 22-Jun-2012 15:23:39 -0400 
RFC822.SIZE 739385 BODY[HEADER.FIELDS (Date To Cc From Subject X
-Priority Importance Priority Content-Type)] {1968}
From: X
To: X
Subject: PAPAI,COMO EU NASCI ?
Date: Tue, 22 May 2012 21:59:42 -0300
Content-Type: multipart/related;
 boundary==_NextPart_000_0001_01CD3866.57075390
Content-Type: multipart/alternative;
 boundary==_NextPart_001_0002_01CD3866.570D6E10
Content-Type: text/plain; charset=iso-8859-1
Content-Type: text/html; charset=iso-8859-1
Content-Type: image/jpeg; name=image004.jpg
Content-Type: image/jpeg; name=image011.jpg
Content-Type: image/jpeg; name=image002.jpg
Content-Type: image/jpeg; name=image009.jpg
Content-Type: image/jpeg; name=image008.jpg
Content-Type: image/jpeg; name=image010.jpg
Content-Type: image/jpeg; name=image003.jpg
Content-Type: image/jpeg; name=image006.jpg
Content-Type: image/jpeg; name=image001.jpg
Content-Type: image/jpeg; name=image005.jpg
Content-Type: image/jpeg; name=image007.jpg

)
A009 OK Completed (0.080 sec)

When it attempts to fetch a body part, however, this happens:

A004 UID Fetch 1 BODY[1]
* 1 FETCH (UID 1 BODY[1] )
A004 OK Completed (0.000 sec)


For kicks, I edited out a ton of X-UOL-SMTP: header fields and 
reconstructed the folder again.  This time I didn't get the error about 
too many header lines, but the result is the same.

I'm heading home to drink cheap beer now and won't get back to this 
until Monday, but it does appear that Cyrus is somehow unhappy with this 
message.

Thanks,

Dave

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: IMAP error reported by server. Invalid body section.

2012-06-22 Thread Simon Matter
 On 06/22/2012 09:43 AM, Dave McMurtrie wrote:
 On 06/22/2012 06:35 AM, Adam Tauno Williams wrote:
 On Thu, 2012-06-21 at 13:07 -0300, Rodrigo Abantes Antunes wrote:
 The source from horde3 is exactly the same as horde4

 That is expected.  It isn't the message but the interpretation of the
 message.  These evil messages contain many named parts separated by a
 boundry (the boundry value is declared in the header of the message).
 Then parts of a message can refer to other parts of the message.  So
 either H4 can't correctly [or incorrectly!] parse the message into
 parts
 by boundry or one part references another part that isn't found.

 It would be useful to ask this question on the Horde / IMP mail list.

 I think this originated as a bug report to Horde and they think it's the
 IMAP server's fault.

 Rodrigo, can you forward the message to me?

 Hi.  Rodrigo sent me the message.  I wanted to confirm that the MIME
 structure was correct so I used munpack which was able to successfully
 unpack all the message parts.  This isn't a guarantee that the MIME
 structure is correct, but at the very least I can't definitely say the
 message is malformed.

 I then imported the message into my mailstore.  reconstruct was not
 pleased with it from the start:

 Jun 22 15:29:48 cyrusbe-d04 reconstruct[28021]: ERROR: message has more
 than 1000 header lines, not caching any more

I did the same test on my box and reconstruct worked fine and I can view
the message with Squirrelmail and Thunderbird without any problems.

What's your version of cyrus-imapd you tested with? I have tested with a
2.4.16 server.

Regards,
Simon


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: IMAP error reported by server. Invalid body section.

2012-06-22 Thread Dave McMurtrie
On Jun 22, 2012, at 5:10 PM, Simon Matter simon.mat...@invoca.ch wrote:

 On 06/22/2012 09:43 AM, Dave McMurtrie wrote:
 On 06/22/2012 06:35 AM, Adam Tauno Williams wrote:
 On Thu, 2012-06-21 at 13:07 -0300, Rodrigo Abantes Antunes wrote:
 The source from horde3 is exactly the same as horde4
 
 That is expected.  It isn't the message but the interpretation of the
 message.  These evil messages contain many named parts separated by a
 boundry (the boundry value is declared in the header of the message).
 Then parts of a message can refer to other parts of the message.  So
 either H4 can't correctly [or incorrectly!] parse the message into
 parts
 by boundry or one part references another part that isn't found.
 
 It would be useful to ask this question on the Horde / IMP mail list.
 
 I think this originated as a bug report to Horde and they think it's the
 IMAP server's fault.
 
 Rodrigo, can you forward the message to me?
 
 Hi.  Rodrigo sent me the message.  I wanted to confirm that the MIME
 structure was correct so I used munpack which was able to successfully
 unpack all the message parts.  This isn't a guarantee that the MIME
 structure is correct, but at the very least I can't definitely say the
 message is malformed.
 
 I then imported the message into my mailstore.  reconstruct was not
 pleased with it from the start:
 
 Jun 22 15:29:48 cyrusbe-d04 reconstruct[28021]: ERROR: message has more
 than 1000 header lines, not caching any more
 
 I did the same test on my box and reconstruct worked fine and I can view
 the message with Squirrelmail and Thunderbird without any problems.
 
 What's your version of cyrus-imapd you tested with? I have tested with a
 2.4.16 server.
 

Interesting.  The server I'm testing on isn't a released version, but rather a 
snapshot build from the caldav-2.4 Git branch.  It should be fairly close to 
2.4.16.  Can you grab telemetry and see what Squirrelmail/tbird is requesting?

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: IMAP error reported by server. Invalid body section.

2012-06-21 Thread Adam Tauno Williams
On Wed, 2012-06-20 at 18:20 -0300, Rodrigo Abantes Antunes wrote:
 Hi, I use horde webmail and I thought my problem was related to horde  
 but like they said it isn't, it's something to do with cyrus, I'd like  
 your help to discover what could I do to solve this. My problem is  
 described here:
 http://bugs.horde.org/ticket/11223

If you look at the source of the message [view message source from your
'old' Horde server'] you should be able to tell if all the message parts
actually exist.  Or have you tried viewing the message in Thunderbird or
Evolution?



signature.asc
Description: This is a digitally signed message part

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: IMAP error reported by server. Invalid body section.

2012-06-21 Thread Rodrigo Abantes Antunes
The source from horde3 is exactly the same as horde4 and I think all  
the message parts are there, at least there is a body/body. If you  
want I can forward you the message to your personal mail.

-- 
Rodrigo Abrantes Antunes
Técnico em Tecnologia da Informação
Coordenadoria de Manutenção e Redes
Instituto Federal Sul-rio-grandense - Campus Pelotas



Citando Adam  Tauno Williams awill...@whitemice.org:

 On Wed, 2012-06-20 at 18:20 -0300, Rodrigo Abantes Antunes wrote:
 Hi, I use horde webmail and I thought my problem was related to horde
 but like they said it isn't, it's something to do with cyrus, I'd like
 your help to discover what could I do to solve this. My problem is
 described here:
 http://bugs.horde.org/ticket/11223

 If you look at the source of the message [view message source from your
 'old' Horde server'] you should be able to tell if all the message parts
 actually exist.  Or have you tried viewing the message in Thunderbird or
 Evolution?




Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

IMAP error reported by server. Invalid body section.

2012-06-20 Thread Rodrigo Abantes Antunes
Hi, I use horde webmail and I thought my problem was related to horde  
but like they said it isn't, it's something to do with cyrus, I'd like  
your help to discover what could I do to solve this. My problem is  
described here:

http://bugs.horde.org/ticket/11223

Thanks.

-- 
Rodrigo Abrantes Antunes
Técnico em Tecnologia da Informação
Coordenadoria de Manutenção e Redes
Instituto Federal Sul-rio-grandense - Campus Pelotas






Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus