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
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
Bare newlines problem
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). -- while() { # The \000 character (NUL) is not allowed if ($line =~ s/\000//g) { print STDERR WARNING: Removing NUL\n; } # Change CRLF or bare CR to LF $endcr = $midcr = 0; $endcr++ if ($line =~ s/\015$//g); # \n already there $midcr++ if ($line =~ s/\015/\n/g); # add \n if ($endcr || $midcr) { print STDERR WARNING: Correcting CR characters\n; } print; } - With regards, Paul van der Vlis. -- 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
Bare newlines problem
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 ? 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
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
Bare newlines problem
Hi all, I have a problem with moving mails from Netscape to a Cyrus (1.5.19) mail server. There a several mails which are in wrong format and Cyrus complains about bare newlines. Is it possible to deactivate this check? I know that Cyrus is right to complain about these mails, but I need them to move to my new server. ;-) Thanks, Roland