Article View: news.software.nntp
Article #84212Re: Mail-to-News
From: Julien ÉLIE
Date: Fri, 22 Jul 2011 23:01
Date: Fri, 22 Jul 2011 23:01
135 lines
6147 bytes
6147 bytes
Hi Dennis,
>> I would tend to think that inews itself should use IHAVE (if
>> available) when POST cannot be used. It is the whole point of the
>> NNTP protocol as described in RFC 3977 and implemented in current
>> versions of innd & nnrpd. inews should comply with RFC 3977, that
>> is to say it should use CAPABILITIES and select the right command
>> to invoke (IHAVE, POST, eventually MODE READER).
>
> Documentation for inews in INN indicates that it's not suitable
> for use on client machines. So these changes won't affect other
> versions of inews out there. Eg the inews that comes with the
> trn Newsreader and the mini-inews that's still out there somewhere.
My comment was only meant for the inews program shipped with INN.
It should be updated to take a benefit from the new commands defined
in RFC 3977.
I do not know much about the other "inews" programs in the wild.
I bet it would also be worthwhile updating them.
>> With news servers like INN 2.4 that predate RFC 3977, the behaviour
>> would remain the same as currently (or maybe try both IHAVE and POST
>> when one of them is not available).
>
> That's a judgement call. Do you want to maintain a 2.4.x branch
> as well as a 2.5.x branch?
No, the 2.4.x branch is no longer maintained.
I was speaking about an updated inews program (knowing RFC 3977) that
would be used against an older news server (knowing RFC 977) like INN 2.4.
The new inews program should send CAPABILITIES, see that it is not
an available command, then probe POST, and then probe IHAVE if POST
did not work, and finally try MODE READER and probe POST again.
> The above shlock perl routine could certainly be made versatile
> enough for most puposes by adding extra parameters. Eg
> "lock_attempts" and "delay" for use in mailpost.
I have come up with a Perl module named INN::Utils::Shlock.
I hope the naming is fine.
Extract from INN::Utils::Shlock(3pm):
NAME
INN::Utils::Shlock - Wrapper around the shlock program
DESCRIPTION
This Perl module wraps the shlock(1) program so that it can easily be used. Calling
shlock is more portable than using flock(2) and its corresponding Perl function
because this function does not work as expected on all existing systems.
See the shlock(1) documentation for more information.
Using INN::Utils::Shlock is straight-forward:
use lib '<pathnews>/lib/perl';
use INN::Utils::Shlock;
my $lockfile = "myprogram.LOCK";
# Acquire a lock.
$INN::Utils::Shlock::lock($lockfile);
# Unlock.
$INN::Utils::Shlock::unlock($lockfile);
These two functions return 1 on success, 0 on failure. Therefore, the success of
(un)locking can be checked for instance as follows:
$INN::Utils::Shlock::lock($lockfile) or die "cannot create lock file";
or:
if ($INN::Utils::Shlock::lock($lockfile, 4) < 1) {
die "giving up after 4 unsuccessful attempts to create lock file";
}
INTERFACE
lock(lockfile)
Tries to create a lock file named lockfile.
lock(lockfile, retries)
Tries to create a lock file named lockfile. If it fails, locking attempts are
repeated once every 2 seconds for at most retries times.
lock(lockfile, retries, delay)
Tries to create a lock file named lockfile. If it fails, locking attempts are
repeated once every delay seconds for at most retries times.
Note that lock(lockfile) is equivalent to lock(lockfile, 0, 2).
unlock(lockfile)
Removes the file named lockfile.
Do not hesitate to make any comments you think appropriate.
(In the man page, the variables are properly written in "italics".)
This new Perl wrapper currently works pretty well.
>> No need to touch signcontrol before having decided on the future of
>> this script:
>> http://inn.eyrie.org/trac/ticket/14
>
> A compromise would be to include signcontrol and maintain it as
> part of the source but not install it by default. Those that
> require it would need to type:
>
> make install signcontrol
>
> Easy enough to explain in the INSTALL documentation.
More ideally, we should fix the per-site configuration issue of
signcontrol so that an update does not erase the customization
made by the user...
> I'm sure I can come up with other semi-useless suggestions :-)
You're welcome!
--
Julien ÉLIE
« Piscis primum a capite foetet. »
Technical Details
Message-ID:
<j0cvgt$pok$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!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!news.trigofacile.com!.POSTED.aaubervilliers-552-1-18-32.w92-141.abo.wanadoo.fr!not-for-mailReferences:
<iuaorh$gbt$1@n102.xanadu-bbs.net> <ivvjd7$c15$1@news.trigofacile.com> <LoJ8po.KpC.B.larch@bath.ac.uk> <j01usk$v8r$1@news.trigofacile.com> <LoMMn0.67I.B.larch@bath.ac.uk>Show Full Headers
Complete Article Headers
Message-ID: <j0cvgt$pok$1@news.trigofacile.com> Subject: Re: Mail-to-News Date: Sat, 23 Jul 2011 01:01:49 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <iuaorh$gbt$1@n102.xanadu-bbs.net> <ivvjd7$c15$1@news.trigofacile.com> <LoJ8po.KpC.B.larch@bath.ac.uk> <j01usk$v8r$1@news.trigofacile.com> <LoMMn0.67I.B.larch@bath.ac.uk> 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!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!news.trigofacile.com!.POSTED.aaubervilliers-552-1-18-32.w92-141.abo.wanadoo.fr!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 22 Jul 2011 23:01:49 +0000 (UTC) Injection-Info: news.trigofacile.com; posting-host="aaubervilliers-552-1-18-32.w92-141.abo.wanadoo.fr:92.141.81.32"; logging-data="26388"; mail-complaints-to="abuse@trigofacile.com" User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; fr; In-Reply-To: <LoMMn0.67I.B.larch@bath.ac.uk> Lines: 135 X-Original-Bytes: 5938