nnrpd puts extra spaces on certain hearders on mailed to mederators articles
Jean Charles Delepine
delepine at u-picardie.fr
Mon May 17 21:30:49 UTC 2004
Hello,
You certainly should have been CCed.
The patch can also be obtain on
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=249151
----- Forwarded message from Jean Charles Delepine <delepine at u-picardie.fr> -----
Return-Path: delepine at delepine.info
From: Jean Charles Delepine <delepine at u-picardie.fr>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: nnrpd puts extra spaces on rfc's hearders on mailed to mederators articles
X-Mailer: reportbug 2.58
Date: Sat, 15 May 2004 14:34:26 +0200
Package: inn2
Version: 2.4.1+20040403-1
Severity: normal
Tags: patch
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()
diff -ruN inn-STABLE-20040403.orig/nnrpd/post.c inn-STABLE-20040403/nnrpd/post.c
--- inn-STABLE-20040403.orig/nnrpd/post.c 2004-02-25 12:16:33.000000000 +0100
+++ inn-STABLE-20040403/nnrpd/post.c 2004-05-15 14:12:16.000000000 +0200
@@ -602,6 +602,7 @@
char *address;
char buff[SMBUF];
char *mta;
+ char *q;
/* Try to get the address first. */
if ((address = GetModeratorAddress(NULL, NULL, group, PERMaccessconf->moderatormailer)) == NULL) {
@@ -628,11 +629,17 @@
/* 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);
+ q = xstrndup(hp->Value, hp->Body - hp->Value + hp->Len);
+ if (*hp->Value == ' ' || *hp->Value == '\t')
+ fprintf(F, "%s:%s\n", hp->Name, q);
+ else
+ fprintf(F, "%s: %s\n", hp->Name, q);
if (FLUSH_ERROR(F)) {
pclose(F);
+ free(q);
return CANTSEND;
}
+ free(q);
}
for (i = 0; i < OtherCount; i++) {
fprintf(F, "%s\n", OtherHeaders[i]);
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (900, 'testing'), (200, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.23-pre8
Locale: LANG=C, LC_CTYPE=C
Versions of packages inn2 depends on:
ii cron 3.0pl1-83 management of regular background p
ii debconf [debconf-2.0] 1.4.25 Debian configuration management sy
ii inn2-inews 2.4.1+20040403-1 NNTP client news injector, from In
ii libc6 2.3.2.ds1-12 GNU C Library: Shared libraries an
ii libdb4.2 4.2.52-16 Berkeley v4.2 Database Libraries [
ii libperl5.8 5.8.3-3 Shared Perl library.
ii perl 5.8.3-3 Larry Wall's Practical Extraction
ii perl-base [perlapi-5. 5.8.3-3 The Pathologically Eclectic Rubbis
ii postfix [mail-transpo 2.0.19-1.0.ipv6.r1 A high-performance mail transport
ii procps 1:3.2.1-2 The /proc file system utilities
ii time 1.7-19 The GNU time program for measuring
-- debconf information:
inn2/postinst-cannot-start:
inn2/preinst-upgrade-largefiles: false
inn2/preinst-upgrade1: false
More information about the inn-bugs
mailing list