A NOTE has been added to this issue. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=1020 
====================================================================== 
Reported By:                igorbelykh86
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   1020
Category:                   IMAP daemon
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
target:                      
====================================================================== 
Date Submitted:             17-Aug-13 09:37 CEST
Last Modified:              17-Aug-13 13:15 CEST
====================================================================== 
Summary:                    dbmail 3.1.2. Imap server returns wrong decoded
header fields.
Description: 
Hi

After upgrading the dbmail to 3.1.2 the IMAP server has began to return
wrong decoded email headers. I've thought that it does it only for old
emails which were been received before upgrading, but no. New mails have
the problem too. This problem appears only when application try to get a
header field. Example:

CLIENT:
UID FETCH 1017 (BODY.PEEK[HEADER.FIELDS (SUBJECT FROM CC TO)] INTERNALDATE
BODY FLAGS)

SERVER:
* 127 FETCH (INTERNALDATE "16-Aug-2013 21:27:40 +0000" FLAGS (\Seen) UID
1017 BODY (("text" "plain" ("charset" "UTF-8") NIL NIL "base64" 60
1)("text" "html" ("charset" "UTF-8") NIL NIL "base64" 90 2) "alternative")
BODY[HEADER.FIELDS (SUBJECT FROM CC TO)] {98}
From: Igor Belykh <myem...@address.com>
Subject: ????? ??????
To: Igor <anotherem...@address.com>

)
A003 OK UID FETCH completed

The subject is in russian. It is encoded correctly. If get full header of
the message the server returns:
....
Subject: =?UTF-8?B?0J3QvtCy0L7QtSDQv9C40YHRjNC80L4=?=
....

what I can do to always get encoded header fields?

Thanks.
====================================================================== 

---------------------------------------------------------------------- 
 (0003559) paul (administrator) - 17-Aug-13 10:33
 http://www.dbmail.org/mantis/view.php?id=1020#c3559 
---------------------------------------------------------------------- 
Question is: what is in the database? Was it during insertion or during
retrieval that something went wrong.

The message_idnr is 1017 in your case. Try following:

select m.message_idnr,n.headername,v.headervalue from dbmail_header h join
dbmail_headername n on h.headername_id=n.id join dbmail_headervalue v on
h.headervalue_id=v.id join dbmail_physmessage p on p.id=h.physmessage_id
join dbmail_messages m on m.physmessage_id=p.id where m.message_idnr=1017;

This should give you a dump of the cached headers. If your database is
UTF-8 encoded, and your terminal is as well, it should give you nicely
readable values.

Of course, the order of the headers returned is also wrong, but that was
fixed already and will be ok in 3.1.3. 

---------------------------------------------------------------------- 
 (0003560) igorbelykh86 (reporter) - 17-Aug-13 13:15
 http://www.dbmail.org/mantis/view.php?id=1020#c3560 
---------------------------------------------------------------------- 
Hi Paul,

All data is readable in the database. All tables is utf-8 encoded. And
system (and terminal too) default encoding is en_US.UTF-8.
Any idea? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
17-Aug-13 09:37  igorbelykh86   New Issue                                    
17-Aug-13 10:33  paul           Note Added: 0003559                          
17-Aug-13 13:15  igorbelykh86   Note Added: 0003560                          
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to