GNOME Bugzilla – Bug 372616
Cancel / Supercedes is unable to recognize my articles
Last modified: 2006-11-10 16:31:50 UTC
I've just tried to supercedes (and after that to cancel) an article I just posted on an internal newsgroup and Pan doesn't recognize the article as sent by me. version tested : 0.118 I have two sender profiles, the one being used is Frederic Crozat <usenet@crozat.net.invalid> and in message, header is : From: Frederic Crozat <usenet@crozat.net.invalid>
Confirmed. The reason is that Pan's profile code is using the format "short name" <address> However, what we're actually posting is as follows: short name <address> (i.e. no quotes) So, when we're checking profiles, the strings don't match and no profile is found. Note that we ARE passing the quoted version to g_mime_message_set_sender(). It seems g_mime_object_to_string() (called in TaskPost) is dropping the quotes.
the GMimeMessage::from field is already missing the quotes before we call g_mime_object_to_string() in TaskPost ... it must have been stripped out before that point.
g_mime_message_set_sender() is stripping out the quotes: std::cerr << LINE_ID << " setting sender [" << s << ']' << std::endl; g_mime_message_set_sender (msg, s.c_str()); std::cerr << LINE_ID << " got sender [" << msg->from << ']' << std::endl; yields: post-ui.cc:1206:new_message_from_ui) setting sender ["Charles Kerr" <charles@rebelbase.com>] (post-ui.cc:1208:new_message_from_ui) got sender [Charles Kerr <charles@rebelbase.com>] fejj, I'm cc'ing you on this since you probably have the relevant RFCs memorized backwards and forwards and can tell me whether this is a Pan bug or a GMime one.
as Charles points out, set_sender() parses the address string into an InternetAddressList struct and then reformats it back out. I think this is there to make sure the string is legally formatted (and encoded, since the string passed in might not be). I think the easiest (best?) solution to this might be the parse both strings to do the comparison, and probably just compare the addr-spec component rather than also the name? I'm not sure about news, so I could be wrong :)
fejj: sounds about right. thanks for the suggestion.
Created attachment 76332 [details] [review] allow cancel/supercede based on matching address, not total `from' header