Article View: news.software.nntp
Article #84427Re: INN's mailpost script - requested change.
From: D. Stussy
Date: Thu, 29 Sep 2011 00:00
Date: Thu, 29 Sep 2011 00:00
48 lines
2892 bytes
2892 bytes
"Julien ΓLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:j5vlqk$4o0$1@news.trigofacile.com...
> >> I suggest to just call the function after a header field has been
filled
> >> into $line.
> >> $line is something like "Header: text\n text\n text".
> >>
> >> $line = Text::Wrap::wrap("", "\t", $line);
> >
> > I think that's the way to go. We could also wrap at 998.
>
> We should indeed force a wrapping at 998.
> (Message-IDs can contain up to 250 bytes -- a wrap at 76 would break
them.)
>
>
> >> Maybe we should also remove lines containing only whitespace
characters
> >> afterwards, just to be sure the header is valid?
> >>
> >> $line =~ s/\n[ \t]*\n/\n/g;
> >> $line =~ s/\n[ \t]*$//;
> >
> > A completely blank line separates headers from body.... Did you mean
> > trailing whitespace?
>
> I mean blank lines (zero or more whitespace characters) in folded header
> fields like:
>
> Subject: Test\n
> line 2\n
> \n
> line 4
>
> (or with "\r\n" -- mailpost uses only "\n" internally)
>
> The third line should be removed. (I think using Text::Wrap might
> introduce such lines, in a few edge cases.)
>
> I do not plan on altering the body with a wrap at 998. Just headers.
Careful: I would interpret the third line as the end of the header, and
the fourth line as part of the body, unless the relevant RFCs require
back-to-back CRLFs.
I didn't think I was suggesting altering the body at all....
Technical Details
Message-ID:
<j60cf9$a04$1@snarked.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news2.google.com!news.glorb.com!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mailReferences:
<j5e6c0$8ib$1@snarked.org> <j5g860$9qe$1@news.trigofacile.com> <j5ggc9$q20$1@snarked.org> <j5thbn$7j6$1@news.trigofacile.com> <j5tnpe$d5r$1@snarked.org> <j5vlqk$4o0$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <j60cf9$a04$1@snarked.org> Subject: Re: INN's mailpost script - requested change. Date: Wed, 28 Sep 2011 17:00:43 -0700 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> References: <j5e6c0$8ib$1@snarked.org> <j5g860$9qe$1@news.trigofacile.com> <j5ggc9$q20$1@snarked.org> <j5thbn$7j6$1@news.trigofacile.com> <j5tnpe$d5r$1@snarked.org> <j5vlqk$4o0$1@news.trigofacile.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news2.google.com!news.glorb.com!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mail Newsgroups: news.software.nntp Lines: 48 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> Injection-Date: Thu, 29 Sep 2011 00:00:41 +0000 (UTC) Injection-Info: snarked.org; posting-host="pool-71-106-211-51.lsanca.dsl-w.verizon.net:71.106.211.51"; logging-data="10244"; mail-complaints-to="newsmaster+complaints@snarked.org" X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478