GNOME Bugzilla – Bug 110967
Posting raw headers confuses other newsreaders
Last modified: 2006-06-18 05:11:13 UTC
When posting messages Pan seems to be encoding only the Subject header, but not the From header. This confuses other newsreaders (Outlook mainly). This problem is actually the cause of (now FIXED) and closely related to bug #110491 (see the last comment from me). Also see sample message at http://bugzilla.gnome.org/showattachment.cgi?attach_id=15622.
fejj: this is closely related to bug #109004. For that bug, you've changed g_mime_message_set_subject() to encode 8bit subjects. http://cvs.gnome.org/bonsai/cvsview2.cgi? diff_mode=context&whitespace_mode=show&root=/cvs/gnome&subdir=pan% 2Fgmime&command=DIFF_FRAMESET&root=/cvs/gnome&file=gmime- message.c&rev1=1.24&rev2=1.25 I suppose we could do the same for g_mime_message_set_sender (), but wouldn't it be better to move this down to g_mime_header_set(), so it applies to all headers?
No, we don't want it at g_mime_header_set(), because then when the parser parses a mal-encoded header, gmime would try to encode it and so writing it back out would alter the message headers. the proper way to fix this bug is to use the InternetAddress routines to generate a properly structured/encoded address string and then use the result as the argument to g_mime_message_set_sender() or... possibly what I can do is: 1) change set_sender() to take an InternetAddress structure? This might be the best solution... then it forces compliance. 2) change set_sender() to have some smarts and parse/write the address in proper structure/encoding. This sounds kludgy to me tho. this brings up a few other things... set_sender() actually sets the From address but the API suggests it sets the Sender: header. Sender: can only have 1 address (the real person who sent the message), whereas From: may actually contain a list of addresses. for now, I suggest using InternetAddress to create the sender string
Fixed in CVS. Thanks for the bugreport, Tõivo. http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan&command=DIFF_FRAMESET&file=message-window.c&rev1=1.357&rev2=1.358&root=/cvs/gnome http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan&command=DIFF_FRAMESET&file=ANNOUNCE.html&rev1=1.127&rev2=1.128&root=/cvs/gnome Fejj: thanks for the quick reply.
Fix confirmed. Thanks guys!