nnrpd puts extra spaces on certain hearders on mailed to mederators articles

Russ Allbery rra at stanford.edu
Mon May 17 21:50:08 UTC 2004


Jean Charles Delepine <delepine at u-picardie.fr> writes:

> As you can see on <slrnca7rrs.qs1.fyr+news at nabab.fyrou.net> and others,
> extra spaces are added to From, Newsgroups, ... headers.

> One solution is to do the same thing in nnrpd/post.c/MailArticle() as in
> nnrpd/post.c/SpoolitTo()

This patch is trying a bit too hard.  The following patch has already been
committed upstream:

--- inn/nnrpd/post.c      2004/02/25 11:09:44     1.99
+++ inn/nnrpd/post.c      2004/05/16 23:41:30     1.100
@@ -1,4 +1,4 @@
-/*  $Revision: 1.99 $
+/*  $Revision: 1.100 $
 **
 **  Check article, send it to the local server.
 */
@@ -628,7 +628,10 @@ MailArticle(char *group, char *article)
     /* Write the headers, a blank line, then the article. */
     for (hp = Table; hp < ARRAY_END(Table); hp++)
        if (hp->Value) {
-           fprintf(F, "%s: %s\n", hp->Name, hp->Value);
+           if (*hp->Value == ' ' || *hp->Value == '\t')
+                fprintf(F, "%s:%s\n", hp->Name, hp->Value);
+           else
+                fprintf(F, "%s: %s\n", hp->Name, hp->Value);
            if (FLUSH_ERROR(F)) {
                pclose(F);
                return CANTSEND;

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>


More information about the inn-bugs mailing list