GNOME Bugzilla – Bug 88100
Pan generates invalid Message-IDs
Last modified: 2006-06-18 04:55:43 UTC
0.12.90 can generate Message-IDs which are rejected by the newsserver: From: "Christophe Lambin" <clambin@die.spammer.die.easynet.be> Subject: test Date: Sat, 13 Jul 2002 14:37:37 +0200 User-Agent: Pan/0.12.90 (By the surly beard of Mrifk, Grignr kneels to no man!) Message-Id: <pan.2002.07.13.12.37.37.254295.2249@die.spammer.die.easynet.be> Newsgroups: easynet.test First guess: it's wrapped into two lines because the long fqdn.
Fejj, is there any simple way to turn of header wrapping for cases like this?
Unfortunately no :\ maybe I can special-case the wrapping of a few headers. *sigh* that's a perfectly valid message-id header :-)
Chris, could you stub out the wrapping code in GMime to make sure that's the problem?
That appears to be the problem: I disabled the wrapping and was able to post an article. With the wrapping in place, the newsserver rejects the article: 441 435 Bad Message-ID
fejj: I think GMime is making invalid headers. rfc 2822's index contains a list of diffs between itself and earlier versions of the spec. 8. Folding white space is not allowed between every token. 13. Folding continuation lines cannot contain only white space.* 19. CFWS within local-parts and domains not allowed.* 21. Folding white space between field name and colon not allowed.* 24. CFWS within msg-id not allowed.* This bug ticket is related to diff #24; the others are just FYI: I don't know if GMime handles them correctly or not. http://rfc.sunsite.dk/rfc/rfc2822.html
Hmm, maybe I spoke too soon. The definition for Message-Id certainly does look it it can wrap: message-id = "Message-ID:" msg-id CRLF in-reply-to = "In-Reply-To:" 1*msg-id CRLF references = "References:" 1*msg-id CRLF msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS] id-left = dot-atom-text / no-fold-quote / obs-id-left id-right = dot-atom-text / no-fold-literal / obs-id-right no-fold-quote = DQUOTE *(qtext / quoted-pair) DQUOTE "CFWS" means comment or folding whitespace. fejj: do you read 2822 the same way?
yea, I read it as I can legally fold before the msg-id 13: this shouldn't be a problem afaik 19: gmime only folder on whole addresses so this should be ok 21: definetely not something to worry about, folding doesn't get applied to this part of the header ever. 24: I think by msg-id they mean the <blah@domain>, which I don't do. anyways, all that being said... I can work on a way to make it not ever fold the Message-Id header.
s/folder/folds I have folder on the brain :-)
I've got at least a partial fix for this in CVS GMime now. I've added an API to allow changing the fold/write function for specific headers, but I can't decide if GMimeMessage should override it or if Pan should. We can talk about this on IRC I guess
Fixed in cvs head; Fejj did most of the heavy lifting in GMime.