inews failed: ...
stassenm at indiana.edu
Tue Apr 2 21:35:53 UTC 2002
On Tue, 2 Apr 2002, Russ Allbery wrote:
> Bill Tangren <bjt at aa.usno.navy.mil> writes:
> > I did not see this question answered in the faq or the man pages.
> > I am running innd-2.3.2-5. Occasionally, someone posts a message that
> > generates the following error:
> > inews failed: Can't send article to the server: 441 Line 33 too long
> > (Article not posted.)
> > When looking at the post, I see the the body of the email has no CR/LF's
> > - it is one long run-on line. Does anyone know what settings I could
> > adjust to keep the server from failing in these cases?
> There aren't any currently. nnrpd doesn't handle article bodies
> containing long lines. This is a definite bug in nnrpd, but
> unfortunately fixing it is not easy.
> > I don't think it matters, but I'll say it anyhow. No one from outside
> > our organization can post to this newsgroup directly. They do it by
> > emailing help on our web site, and sendmail, after processing for
> > viruses/spam, sends it on to the news server.
Bill's problem messages are coming from email. Perhaps he's using
mailpost? In that case, it probably wouldn't be that hard to add code to
use Text::Wrap on the message body in mailpost. Add something like:
unless ($rest =~ /\n.+$/) #Assumes no too-long lines if embedded \n
$rest = wrap('','',$rest); #wraps to default of 72 columns
$rest .= $_ while (<STDIN>);
$rest =~ s/\n*$/\n/g; # Remove trailing \n except very last
print TMPFILE $rest;
close TMPFILE ;
in mailpost about 2/3 of the way down, after the header processing.
That doesn't solve the problem in inews, but at least it would avoid the
problem for (most) posts via mailpost.
I picked the unless condition on the theory that you wouldn't want to
rewrap all posts, and I assumed the mailer would either wrap lines or not.
You may find that yopu need to change it for your particular problem
mails (if the mailer puts a newline between unwrapped paragraphs, for
example). You can leave it out altogether if you simply want to rewrap
Finally, note that I haven't tested this.
More information about the inn-workers