Re: Bare newlines problem
Paul van der Vlis wrote: It's a big message with foto's, 3.5 MB. I am not sure this warning is correct. I hope somebody can tell me how I can remove the bare newline(s) in the message. I've had to deal with this issue when moving such a message between accounts, in my case from a UW-IMAP server using mbx to a Cyrus 2.3 server. While forwarding the message usually works, it's inelegant. Oddly, I've found that simply copying it to temporary folder on the UW-IMAP server before copying it to Cyrus is often all that's needed for the operation to be successful. YMMV. Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Bare newlines problem
Joseph Brennan schreef: > > > --On Tuesday, April 3, 2007 13:27 +0200 Paul van der Vlis > <[EMAIL PROTECTED]> wrote: > >> Hello, >> >> When I move a message to another mailbox, I get a warning about bare >> newlines. How can I remove these bare newlines? >> >> It's a big message with foto's, 3.5 MB. I am not sure this warning is >> correct. >> >> I allready tried a perl-script of Joseph Brennan what I found in this >> list, but it did not change the message (checked with diff). > > The script prepares mbox-format mailboxes for mailutil, which complains > if there are CR characters (\015) in the mbox-format files. It changes > CRLF to LF and then changes remaining CR to LF. Bare LF is normal for > unix files. > > Are you sure it says "bare newlines"? Newline is an ambiguous term. Yes. The warning is: "Message contains bare newlines." It's Cyrus 2.1. I hope somebody can tell me how I can remove the bare newline(s) in the message. With regards, Paul van der Vlis. > Joseph Brennan > Lead Email Systems Engineer > Columbia University Information Technology > > > > Cyrus Home Page: http://cyrusimap.web.cmu.edu/ > Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html -- http://www.vandervlis.nl/ Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Bare newlines problem
--On Tuesday, April 3, 2007 13:27 +0200 Paul van der Vlis <[EMAIL PROTECTED]> wrote: Hello, When I move a message to another mailbox, I get a warning about bare newlines. How can I remove these bare newlines? It's a big message with foto's, 3.5 MB. I am not sure this warning is correct. I allready tried a perl-script of Joseph Brennan what I found in this list, but it did not change the message (checked with diff). The script prepares mbox-format mailboxes for mailutil, which complains if there are CR characters (\015) in the mbox-format files. It changes CRLF to LF and then changes remaining CR to LF. Bare LF is normal for unix files. Are you sure it says "bare newlines"? Newline is an ambiguous term. Joseph Brennan Lead Email Systems Engineer Columbia University Information Technology Cyrus Home Page: http://cyrusimap.web.cmu.edu/ Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Bare newlines problem
Hi, I end up answering myself here :) On Sat, 2005-07-09 at 16:17 +0200, [EMAIL PROTECTED] wrote: > Hi, I'm doing a large import of mail from Outlook and into Cyrus. My problem > is > with emails that contain bare newlines. > > Cyrus rejects these mails (as it probably should). > > What I am wondering about, is if anyone has made a patch so that cyrus may fix > the mail or at least let it pass into the messagestore ? Fedora Core 3 included a Cyrus version with a nobarenewlines patch. I've included it here so that the next person who comes by should be able to use it: --- cyrus-imapd-2.1.15/imap/message.c.orig 2003-11-11 15:45:11.0 +0100 +++ cyrus-imapd-2.1.15/imap/message.c 2003-11-11 15:35:11.0 +0100 @@ -246,7 +246,8 @@ for (p = (unsigned char *)buf; *p; p++) { if (*p == '\n') { - if (!sawcr) r = IMAP_MESSAGE_CONTAINSNL; + /* Do *NOT* check for RFC compliant line breaks (bare newlines) */ + /* if (!sawcr) r = IMAP_MESSAGE_CONTAINSNL; */ sawcr = 0; if (blankline) { inheader = 0; If someone has a more elegant solution, I'm all ears :) Regards, Tarjei > Kind regards, > Tarjei > --- > Cyrus Home Page: http://asg.web.cmu.edu/cyrus > Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html -- Tarjei Huse <[EMAIL PROTECTED]> --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Bare newlines
On Fri, 28 Mar 2003, John Alton Tamplin wrote: > Sebastian Konstanty Zdrojewski wrote: > > > I was attempting to move an email message from a local account onto an > > IMAP directory located on Cyrus. The client I am using is Netscape > > Mail and usually it gives me no problems. This time, I am not able to > > move the message because the client gives the following error: > > > > Unable to perform operation. Message contains bare newlines. > > > > The message has an attached PDF file (2Mb size) and a signature with > > image integrated. Any idea of what can be my problem? > > In IMAP, messages are required to have \r\n as line terminators, not > just \n. Many other IMAP servers (or mail clients' local folders) do > not enforce strict RFC compliance, while Cyrus does -- when we converted > from UW-IMAP to Cyrus I had to write code to munge messages into the > proper format (8 bit or null data in headers, and bogus headers are the > other two issues you will likely run into). John, How are you dealing with "8 bit or null data in headers, and bogus headers"? - Bill > > -- > John A. Tamplin Unix System Administrator > Emory University, School of Public Health +1 404/727-9931 > > >
Re: Bare newlines
Sebastian Konstanty Zdrojewski wrote: I was attempting to move an email message from a local account onto an IMAP directory located on Cyrus. The client I am using is Netscape Mail and usually it gives me no problems. This time, I am not able to move the message because the client gives the following error: Unable to perform operation. Message contains bare newlines. The message has an attached PDF file (2Mb size) and a signature with image integrated. Any idea of what can be my problem? In IMAP, messages are required to have \r\n as line terminators, not just \n. Many other IMAP servers (or mail clients' local folders) do not enforce strict RFC compliance, while Cyrus does -- when we converted from UW-IMAP to Cyrus I had to write code to munge messages into the proper format (8 bit or null data in headers, and bogus headers are the other two issues you will likely run into). -- John A. Tamplin Unix System Administrator Emory University, School of Public Health +1 404/727-9931