Bare newlines problem

Tarjei Huse tarjei at nu.no
Sat Jul 9 10:51:10 EDT 2005


Hi, I end up answering myself here :)
On Sat, 2005-07-09 at 16:17 +0200, tarjei at nu.no 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.000000000 +0100
+++ cyrus-imapd-2.1.15/imap/message.c   2003-11-11 15:35:11.000000000
+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 <tarjei at nu.no>

---
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




More information about the Info-cyrus mailing list