From Newsgroup: news.software.nntp
Hi!
This is for all those still using the (legacy) "suck" package (under
Debian) to connect their INN to the outside world. The current version
of this package won't correctly remove multi-line headers before
submitting outgoings posts to an upstream server.
1) What is the "suck" package?
---------------------------
From the INN 2.x FAQ , last modified 2026-07-19:
| Subject: 6.7. Use INN without a direct news feed
|
| INN is designed to be used as a regular news server, receiving direct news
| feeds from other news servers and sending news directly to other news
| servers using the peer-to-peer portions of the NNTP protocol. However,
| it is also possible to use INN as, in essence, a local cache for a news
| server that you can use to read and post but which doesn't treat your
| server like a peer.
|
| This configuration is generally called a "suck" feed, because rather than
| having news fed directly to your server, you pull it down or "suck" it
| from another news server, and because possibly the first and one of the
| most widely used packages for doing this is named suck.
|
| INN comes with a program named pullnews to pull down articles from another
| server and to feed articles to another server using either POST like a news
| reader or peer-to-peer commands. See the pullnews manual page for more
| information.
|
| Alternately, you can use an external package to do this. The two most
| popular are suck and newsx; however, they are no longer actively
| maintained. You may still be able to find a package in your local
| distribution or package repository.
I will be referring to the Debian package in the rest of this post.
Other packages may or may not be similar.
2) What's the problem with the current "suck" package?
---------------------------------------------------
"suck" is still part of Debian and does mostly work fine with current
versions of INN. The only problem is the "postfilter" used to remove
some headers [1] from outgoing postings before submitting them via
rpost to your upstream server(s).
The get-news (Perl) script from the (Debian) "suck" package uses
rpost's filter functionality with a simple shell script (put-news) to
remove those headers via sed with a "sedcmd" defined in get-news.conf.
Those "sedcmd" is missing the (not quite) new Injection-Info header.
Adding that header will not really help, as Injection-Info contains a
lot of information, so it's mostly split to multiple (at least two)
lines. The "sedcmd" for put-news can't handle multi-line headers, so
it will just remove the first line of the header (with its name); the continuation lines will attach to the last header before
Injection-Info, leading to possibly unexpected behaviour.
See for example the current incarnation of the "INN 2.x FAQ":
| Message-ID: <FAQ-faq-1787295661$
32419@hope.eyrie.org>
| Injection-Date: Fri, 21 Aug 2026 07:01:01 -0000 (UTC)
| Injection-Info: hope.eyrie.org;
| logging-data="32462"; mail-complaints-to="
news@eyrie.org"
put-news would remove "Injection-Info: hope.eyrie.org;", leaving the
rest, so the headers would look like this:
| Message-ID: <FAQ-faq-1787295661$
32419@hope.eyrie.org>
| Injection-Date: Fri, 21 Aug 2026 07:01:01 -0000 (UTC)
| logging-data="32462"; mail-complaints-to="
news@eyrie.org"
3) How to fix it?
--------------
One solution would be to fix the "sedcmd" to work with multi-line
headers. That's not easy [2], and I don't speak sed, so my solution
was to replace put-news with another filter script written in Perl.
suck-postfilter.pl can be placed next to put-news in /usr/lib/suck/
(or somewhere else), then you just have to add
| postfilter: /usr/lib/suck/suck-postfilter.pl
(or whatever path you need) to get-news.conf, and you're done.
Code is at <
https://code.virtcomm.de/thh/INN-config> in the "contrib" directory.
-thh
[1] Like NNTP-Posting-Host, NNTP-Posting-Date, X-Complaints-To, Xref,
X-Trace, X-Server-Date, Path and, for current versions of INN,
Injection-Info.
[2] If you can read German - or have it translated -, a solution has
been discussed in <10vsue7$dnbl$
1@gwaiyur.mb-net.net> and followup
in de.comm.software.newsserver.
--- Synchronet 3.22a-Linux NewsLink 1.2