Well I have traced it down to the following function:

modules/dbpgsql.c Line 308

unsigned long db_escape_binary(char *to,
                               const char *from, unsigned long length)
{
        size_t to_length;
        unsigned char *esc_to;

        esc_to = PQescapeBytea((const unsigned char *)from, length,
&to_length);
        strncpy(to, (const char *)esc_to, to_length);
        PQfreemem(esc_to);
        return (unsigned long)(to_length - 1);
}


Specifically the PQescapeBytea function.  If I output the from string,
then output the esc_to string after the function it has all the \011
\012 etc
things in it.

I've also found there is some issue about using this function when
using PostgreSQL >=8.1.4

It seems like the dbmail-imapd daemon doesn't decode the encoded
string when it retreives it.

Still digging....

--
David A. Niblett               | email: [EMAIL PROTECTED]
Network Administrator          | Phone: (352) 334-3400
Gainesville Regional Utilities | Web: http://www.gru.net/
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Niblett, David A
Sent: Thursday, November 09, 2006 3:53 PM
To: DBMail mailinglist
Subject: [Dbmail] DBMail 2.20rc1 and SquirrelMail


I took the plunge and converted my personal server to 2.2.0rc1 to start
testing.  I have an interesting error, and I'm hoping that it's
something very simple.

I followed the conversion process from 2.0 to 2.2 and all my existing
messages are great.  The problem seems to be when I get new mail and try
to view it in SquirrelMail (all I use at home).

Any new message, I get the error:

Body retrieval error. The reason for this is most probably that the
message is malformed. 
Command: FETCH 125624 BODY[1] 
Response: OK 
Message: UID FETCH completed 
FETCH line: * 2 FETCH (UID 125624 BODY[1] NIL) 


The message isn't malformed (or at least it wasn't when it was
sent) and it's all new mail since the upgrade.  I noticed that 
the messages seem to all be something like:

Received: from localhost (unknown [127.0.0.1])\011by asok.niblett.org
(Postfix)\012\011with ESMTP id 056D52EA4D\011for
<[EMAIL PROTECTED]>;\012\011Thu,  9 Nov 2006 18:02:30 +0000

For some reason there are a bunch of \011 codes in the message. In
checking the dbmail_messageblks for that message it's all jumbled in
with the \011.

I'm running DBMail 2.2.0rc1
Postfix delivery via dbmail-lmtpd
Postgresql 8.1.5

I don't think this is a problem with dbmail-imapd, maybe an issue with
dbmail-lmtpd, but also could be an issue with postgesql.

Any thoughts?

--
David A. Niblett               | email: [EMAIL PROTECTED]
Network Administrator          | Phone: (352) 334-3400
Gainesville Regional Utilities | Web: http://www.gru.net/
 
_______________________________________________
DBmail mailing list
[email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to