Thread View: news.software.nntp
12 messages
12 total messages
Started by dlinsalata
Tue, 30 Jun 1998 00:00
re: Replacing innmail?
Author: dlinsalata
Date: Tue, 30 Jun 1998 00:00
Date: Tue, 30 Jun 1998 00:00
11 lines
959 bytes
959 bytes
Nevermind. Answered my own question by just changing MAILCMD to /usr/bin/mail and launching a news.daily run manually. Worked like a charm with no more nasty innmail errors! -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Re: Replacing innmail?
Author: Andrew Gierth
Date: Tue, 30 Jun 1998 00:00
Date: Tue, 30 Jun 1998 00:00
21 lines
1360 bytes
1360 bytes
>>>>> "dlinsalata" == dlinsalata <dlinsalata@my-dejanews.com> writes: dlinsalata> Nevermind. dlinsalata> Answered my own question by just changing MAILCMD to dlinsalata> /usr/bin/mail and launching a news.daily run manually. dlinsalata> Worked like a charm with no more nasty innmail errors! The reason that innmail was introduced was that using a system-supplied "mail" program was often resulting in security holes that were being exploited. innmail requires Perl 5, and the lack thereof is probably the cause of the "file not found" errors you were experiencing. (See the first line of the innmail script for why.) -- Andrew.
Re: Replacing innmail?
Author: Russ Allbery
Date: Tue, 30 Jun 1998 00:00
Date: Tue, 30 Jun 1998 00:00
24 lines
1559 bytes
1559 bytes
Peter J Naylor <pete@filter.supernal.net> writes: > Andrew Gierth <andrew@erlenstar.demon.co.uk> writes: >> innmail requires Perl 5, > As does INN itself - the dependency is unnecessary and very irritating. You don't filter, do you? (I'm seriously considering beginning the project of rewriting all the shell scripts that come with INN into Perl, just because currently they're a zoo, slow, and subject to all of the annoying and possibly dangerous shell misinterpretations of things. Even if such a project were rolled into the INN tree, I would expect both shell and Perl versions to be maintained for the forseeable future, but I'd dearly like to have the support programs written in a more readable and maintainable language than shell scripting. I'd definitely stick to Perl 5, as Perl 4 is long, long dead.) -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Re: Replacing innmail?
Author: Russ Allbery
Date: Wed, 01 Jul 1998 00:00
Date: Wed, 01 Jul 1998 00:00
80 lines
4153 bytes
4153 bytes
Peter J Naylor <pete@filter.supernal.net> writes: > Russ Allbery <rra@stanford.edu> writes: >> Peter J Naylor <pete@filter.supernal.net> writes: >>> No. If I did I'd accomplish it using methods similar to the hippo. >>> There is absolutely no way I'd consider doing it with an interpretted >>> scripting language. >> Even though it's dramatically faster > Really? How so? Because from an embedded interpreted language, I have access to all of INN. There are patches now that let me query INN to see if a group is moderated, cancel a message already received, add things to the history file, do history lookups, etc. That stuff is slow, impossible, or memory bloated in an external program, or all three. >> and more convenient. > For whom? Developers of the filters, since the embedded ones have more capabilities. > Wouldn't it be nicer to be able to specify an executable in the config > files which would be forked at run time and sit there being fed either > the complete article or just the headers (another config file option?) - > returning responses which match a predefined set that INN could then act > upon? That way you could write the executable in whatever language you > prefer - shell script if you wish. Sure, that would be nice; that's what Cyclone does. I wouldn't use it, because an embedded language is even nicer and considerably more flexible, plus lets me do things that approach wouldn't without sending stuff through ctlinnd (with all the race conditions and other problems involved there), but I think that would be good functionality to add to INN for those who do want that. >> Directly traceable to using shell rather than something with sane >> quoting behavior that doesn't try to execute everything. > Directly traceable to poor programming, and Perl is just as likely to be > problematic when someone makes a mistake. Perl itself isn't free from > security problems either. I didn't argue that it was free of security problems, but it's considerably more secure than shell. Honestly, that's not a controversial statement, even among people who detest Perl. Shell scripts are a lot of things, including insanely portable, but secure isn't high on the list; there are just too many quoting irregularities and too many ways to get it wrong. Extremely experienced shell programmers have a hard time writing secure shell scripts. I honestly don't think the same statement is true of Perl programmers of the same relative expertise. > The readability issue is your opinion only, and the line counts are both > unsubstantiated and unimportant to users. They're important to me. > The scripts we're talking about have negligible performance impact when > considering the overall package. If performance was truly of major > importance they shouldn't be interpretted. *shrug* Matters to me. Perl is about 3 times slower than C for this, and several orders of magnitude easier to write for the sorts of things those scripts do. > Only if they're actually shared. Small binaries make better friends, > and so do packages that install without requiring half a dozen other > packages that you otherwise have no use for. Which is why it should be an option. -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Re: Replacing innmail?
Author: Russ Allbery
Date: Wed, 01 Jul 1998 00:00
Date: Wed, 01 Jul 1998 00:00
52 lines
2763 bytes
2763 bytes
Peter J Naylor <pete@filter.supernal.net> writes: > Russ Allbery <rra@stanford.edu> writes: >> You don't filter, do you? > No. If I did I'd accomplish it using methods similar to the hippo. > There is absolutely no way I'd consider doing it with an interpretted > scripting language. Even though it's dramatically faster and more convenient. Okay. Fair enough; I'll stick with my tools and you're certainly welcome to yours. I'd prefer that INN not *require* Perl unless it's absolutely necessary either. > I have no issue with the Perl filtering hooks - they can easily be > configured out. It seems a bit weird that there isn't a generic > interface for such filters though. The problem is that you can't really write a generic interface for embedding an interpretor into a binary. There are interfaces for the two most common embedded languages. >> (I'm seriously considering beginning the project of rewriting all the >> shell scripts that come with INN into Perl, just because currently >> they're a zoo, slow, and subject to all of the annoying and possibly >> dangerous shell misinterpretations of things. > Strange - I've never had the slightest hint of trouble with the shell > scripts. You'd already fixed the security hole in the control message parsing before the CERT advisory blew up? Directly traceable to using shell rather than something with sane quoting behavior that doesn't try to execute everything. > Again, I have no problems with the shell scripts, but I find the Perl > equivalents are exactly that - *equivalents*. Why bother? Because it would reduce undreadable 200 line scripts to readable 30 line scripts that run an order of magnitude faster and require less resources to run on my system, given that Perl is already in memory. news:~> ls -al /usr/local/bin/perl -rwxr-xr-x 2 root root 8896 Dec 29 1997 /usr/local/bin/perl* Shared libraries are your friend. -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Re: Replacing innmail?
Author: Peter J Naylor
Date: Wed, 01 Jul 1998 00:00
Date: Wed, 01 Jul 1998 00:00
66 lines
3705 bytes
3705 bytes
In article <m390meuulh.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> writes:
> You don't filter, do you?
No. If I did I'd accomplish it using methods similar to the hippo.
There is absolutely no way I'd consider doing it with an interpretted
scripting language.
I have no issue with the Perl filtering hooks - they can easily be
configured out. It seems a bit weird that there isn't a generic
interface for such filters though.
> (I'm seriously considering beginning the project of rewriting all the
> shell scripts that come with INN into Perl, just because currently they're
> a zoo, slow, and subject to all of the annoying and possibly dangerous
> shell misinterpretations of things.
Strange - I've never had the slightest hint of trouble with the shell
scripts. Everything has always just worked until someone decided to
replace basic parts of the package with Perl scripts and that dependency
was somehow left out of the install notes and was not curable through
identified config parameters.
> Even if such a project were rolled
> into the INN tree, I would expect both shell and Perl versions to be
> maintained for the forseeable future,
I'd like to think so, but I suspect that given the existing unnecessary
Perl dependencies it'll be even easier for people to fall back to it
for other programming needs (whether well suited to Perl or not).
> but I'd dearly like to have the
> support programs written in a more readable and maintainable language than
> shell scripting. I'd definitely stick to Perl 5, as Perl 4 is long, long
> dead.)
Again, I have no problems with the shell scripts, but I find the Perl
equivalents are exactly that - *equivalents*. Why bother? Just to
mess with people who'd like to simply get the package and install it
without having to run all over the place installing otherwise unnecessary
packages in order to perform a couple of very basic support functions?
I don't agree about Perl5's readability vs shell scripts either.
INN has traditionally been something of a bear for the wannabe news
administrator. Why create extra irritations, difficulties and
dependencies? I understand that some people run to Perl for every
need because they find it easier to use. At some point though, if
you genuinely want to make INN a better package for the users, putting
together a package that _just_builds_ and has as few external (variable)
needs as possible should win out.
Adding the Perl dependencies creates more of the same issues that you
claim to be solving - variability in systems/shells/external-utilities
and paths.
--
/*-------------------------------------------------------------*
* Peter James Naylor ## SysAdmin, Supernal Technologies, Inc. *
*-------------------------------------------------------------*
* pete@filter.supernal.net ## <http://www.supernal.net> *
*-------------------------------------------------------*/
Re: Replacing innmail?
Author: Dave Barr
Date: Wed, 01 Jul 1998 00:00
Date: Wed, 01 Jul 1998 00:00
16 lines
1045 bytes
1045 bytes
In article <m3d8bqoxkm.fsf@windlord.Stanford.EDU>, Russ Allbery <rra@stanford.edu> wrote: >I'd prefer that INN not *require* Perl unless it's absolutely necessary >either. Funny. I have no qualms about requiring Perl 5 for INN. I find this thread a little silly. --Dave -- http://www.cis.ohio-state.edu/~barr/ barr@cis.ohio-state.edu
Re: Replacing innmail?
Author: Peter J Naylor
Date: Wed, 01 Jul 1998 00:00
Date: Wed, 01 Jul 1998 00:00
16 lines
1198 bytes
1198 bytes
In article <87hg13uhd9.fsf@erlenstar.demon.co.uk>,
Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:
>
> innmail requires Perl 5,
As does INN itself - the dependency is unnecessary and very irritating.
--
/*-------------------------------------------------------------*
* Peter James Naylor ## SysAdmin, Supernal Technologies, Inc. *
*-------------------------------------------------------------*
* pete@filter.supernal.net ## <http://www.supernal.net> *
*-------------------------------------------------------*/
Re: Replacing innmail?
Author: Peter J Naylor
Date: Thu, 02 Jul 1998 00:00
Date: Thu, 02 Jul 1998 00:00
26 lines
1711 bytes
1711 bytes
In article <6ndd5f$gtg$1@news.cis.ohio-state.edu>,
barr@cis.ohio-state.edu (Dave Barr) writes:
> In article <m3d8bqoxkm.fsf@windlord.Stanford.EDU>,
> Russ Allbery <rra@stanford.edu> wrote:
>>I'd prefer that INN not *require* Perl unless it's absolutely necessary
>>either.
>
> Funny. I have no qualms about requiring Perl 5 for INN.
Probably because you aren't a prospective new INN user, and you likely
have Perl installed for other reasons. That doesn't make it sensible
for INN.
> I find this thread a little silly.
They're everywhere Dave, why not track them all down and pass judgement?
--
/*-------------------------------------------------------------*
* Peter James Naylor ## SysAdmin, Supernal Technologies, Inc. *
*-------------------------------------------------------------*
* pete@filter.supernal.net ## <http://www.supernal.net> *
*-------------------------------------------------------*/
Re: Replacing innmail?
Author: Peter J Naylor
Date: Thu, 02 Jul 1998 00:00
Date: Thu, 02 Jul 1998 00:00
101 lines
4652 bytes
4652 bytes
In article <m3d8bqoxkm.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> writes:
> Peter J Naylor <pete@filter.supernal.net> writes:
>> Russ Allbery <rra@stanford.edu> writes:
>
>>> You don't filter, do you?
>
>> No. If I did I'd accomplish it using methods similar to the hippo.
>> There is absolutely no way I'd consider doing it with an interpretted
>> scripting language.
>
> Even though it's dramatically faster
Really? How so?
> and more convenient.
For whom?
> Okay. Fair
> enough; I'll stick with my tools and you're certainly welcome to yours.
> I'd prefer that INN not *require* Perl unless it's absolutely necessary
> either.
That's precisely my point - and Perl is not a necessary requirement in
the case of INN.
>> I have no issue with the Perl filtering hooks - they can easily be
>> configured out. It seems a bit weird that there isn't a generic
>> interface for such filters though.
>
> The problem is that you can't really write a generic interface for
> embedding an interpretor into a binary. There are interfaces for the two
> most common embedded languages.
I wouldn't want an embedded interpretor - happily they're easy to
configure out. spamhippo is a set of patches for the INN configs and
source code. Wouldn't it be nicer to be able to specify an executable
in the config files which would be forked at run time and sit there
being fed either the complete article or just the headers (another
config file option?) - returning responses which match a predefined
set that INN could then act upon? That way you could write the
executable in whatever language you prefer - shell script if you wish.
>> Strange - I've never had the slightest hint of trouble with the shell
>> scripts.
>
> You'd already fixed the security hole in the control message parsing
> before the CERT advisory blew up?
No, but thankfully I wasn't prone to that problem - I don't process
newgroups or rmgroups automatically - they're all mailed on for a
human to look at. That's not to say it wasn't a serious problem
for many others.
> Directly traceable to using shell
> rather than something with sane quoting behavior that doesn't try to
> execute everything.
Directly traceable to poor programming, and Perl is just as likely to
be problematic when someone makes a mistake. Perl itself isn't free
from security problems either.
>> Again, I have no problems with the shell scripts, but I find the Perl
>> equivalents are exactly that - *equivalents*. Why bother?
>
> Because it would reduce undreadable 200 line scripts to readable 30 line
> scripts
The readability issue is your opinion only, and the line counts are both
unsubstantiated and unimportant to users.
> that run an order of magnitude faster
The scripts we're talking about have negligible performance impact
when considering the overall package. If performance was truly of
major importance they shouldn't be interpretted.
> and require less resources
> to run on my system, given that Perl is already in memory.
That's your choice and your system. I don't use Perl for anything.
> news:~> ls -al /usr/local/bin/perl
> -rwxr-xr-x 2 root root 8896 Dec 29 1997 /usr/local/bin/perl*
>
> Shared libraries are your friend.
Only if they're actually shared. Small binaries make better friends,
and so do packages that install without requiring half a dozen other
packages that you otherwise have no use for.
--
/*-------------------------------------------------------------*
* Peter James Naylor ## SysAdmin, Supernal Technologies, Inc. *
*-------------------------------------------------------------*
* pete@filter.supernal.net ## <http://www.supernal.net> *
*-------------------------------------------------------*/
Re: Replacing innmail?
Author: Russ Allbery
Date: Thu, 02 Jul 1998 00:00
Date: Thu, 02 Jul 1998 00:00
96 lines
5519 bytes
5519 bytes
Peter J Naylor <pete@filter.supernal.net> writes: > Russ Allbery <rra@stanford.edu> writes: >> Because from an embedded interpreted language, I have access to all of >> INN. There are patches now that let me query INN to see if a group is >> moderated, cancel a message already received, add things to the history >> file, do history lookups, etc. That stuff is slow, impossible, or >> memory bloated in an external program, or all three. > You're making the comparison between the two particular languages which > are provided with a direct interface to INN functions and everything > else - which doesn't have the same interface. This doesn't tell me > anything at all about why using an interpretted scripting language is > dramatically faster than a compiled binary for filtering. Oh, wait, I think I see the problem. The internal design of INN is highly monolithic, that being one of the original design goals since it was originally written back in the days when a single process handling everything was really quite a bit faster. (May still be, I'm not sure.) As such, my understanding is that providing those hooks to anything that *isn't* embedded in the INN process itself would require a fundamental reworking of the structure of INN. The current interface, ctlinnd, works well for what it's intended to be used for, but is not suitable for issuing a *lot* of commands like a filter would need to. The locking and rendezvous protocols necessary are too time-consuming. So yes, I agree that what you want to see would probably be a nice thing to have, but it's very difficult to do. In the meantime, it's much easier to directly embed a language *designed* for embedding (which C really was not) into the INN process itself. An external C daemon in the present state of INN would be slow and less functional. In a redesigned INN that could be fixed, but for right now an embedded language is better. > Why Perl though? We went from a shell script that worked for everyone > but recently needed a security fix, to another interpretted script. The > security problem doesn't exist in the patched shell script or the Perl > script. The Perl script also uses sendmail instead of UCB Mail. What's > the advantage that justifies the dependency on a totally separate and > otherwise unnecessary package? Probably ease of coding; it's easier to write in Perl than it is in shell for most people. > Couldn't the same have been done in C and just compiled with the rest of > INN? Oh, probably, but again it's harder to write this sort of script in C than it is in Perl. I'm reasonably experienced in both languages, having written non-trivial chunks of code in both, and yet it's dramatically faster for me to develop in Perl. Admittedly, I have a strong Perl bias, but I don't think it's solely due to that, and my experience has been backed up by a lot of other people. Perl is an inherently higher-level language. > Because they use more disk space? The scripts do the same thing as far > as the user is concerned, only one needs Perl, which might not already > be available and may be unwanted. Nah, it's not disk space. It's a news server; nickle and diming disk space by reducing script size would be, er, dumb. It's because I'm the sort of person who *looks* at these things all the time and tweaks them, and it's easier for me to look at and tweak something that's shorter and in Perl than something that's long and in shell. It's also easier for me to modify a Perl script and keep it secure. Again, a lot of this is personal preference. That's why I'd like people to have the choice. > I would agree with that attitude if these scripts were for your personal > use at your site only. Since INN is intended for use by many, it is > worth some extra time to accomplish a task in the best manner rather > than the quickest/easiest. Likely true, but at the same time it has to be easy enough to work on INN that people will keep working on INN. My guess is that the existing script is in Perl because the person who wrote it knew how to write it in Perl, and if you submitted a patch against INN 2.0 that provided the shell script as an alternative, it would be accepted. (On the other hand, I believe INN 2.0 includes innreport as the default log scanner, and innreport is the sort of thing that would be pretty much impossible to write in shell and have it run in finite time and produce nice output, and would be a real bitch to write in C.) -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Re: Replacing innmail?
Author: Peter J Naylor
Date: Fri, 03 Jul 1998 00:00
Date: Fri, 03 Jul 1998 00:00
100 lines
5558 bytes
5558 bytes
In article <m3k95wrk0t.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> writes:
> Peter J Naylor <pete@filter.supernal.net> writes:
>
>>> Even though it's dramatically faster
>
>> Really? How so?
>
> Because from an embedded interpreted language, I have access to all of
> INN. There are patches now that let me query INN to see if a group is
> moderated, cancel a message already received, add things to the history
> file, do history lookups, etc. That stuff is slow, impossible, or memory
> bloated in an external program, or all three.
You're making the comparison between the two particular languages which
are provided with a direct interface to INN functions and everything
else - which doesn't have the same interface. This doesn't tell me
anything at all about why using an interpretted scripting language
is dramatically faster than a compiled binary for filtering.
>>> and more convenient.
>
>> For whom?
>
> Developers of the filters, since the embedded ones have more capabilities.
I don't disagree, but the extra convenience is provided by hooks in INN.
It would be far more convenient to allow people to use whatever they wish.
>> Wouldn't it be nicer to be able to specify an executable in the config
>> files which would be forked at run time and sit there being fed either
>> the complete article or just the headers (another config file option?) -
>> returning responses which match a predefined set that INN could then act
>> upon? That way you could write the executable in whatever language you
>> prefer - shell script if you wish.
>
> Sure, that would be nice; that's what Cyclone does. I wouldn't use it,
> because an embedded language is even nicer and considerably more flexible,
I don't understand. How is it more flexible? Is it more flexible
because it still has access to more internal functions than the
externally forked process? I believe those are the hooks which are
patched into INN - why couldn't the functions be made available to
the interface for the generic, forked process?
> plus lets me do things that approach wouldn't without sending stuff
> through ctlinnd (with all the race conditions and other problems involved
> there), but I think that would be good functionality to add to INN for
> those who do want that.
Wait... if INN is communicating directly with the process it forks, and
providing an interface to all the same functions as it does through
the Perl hooks, what has ctlinnd got to do with it?
> I didn't argue that it was free of security problems, but it's
> considerably more secure than shell. Honestly, that's not a controversial
> statement, even among people who detest Perl. Shell scripts are a lot of
> things, including insanely portable, but secure isn't high on the list;
> there are just too many quoting irregularities and too many ways to get it
> wrong.
Why Perl though? We went from a shell script that worked for everyone
but recently needed a security fix, to another interpretted script.
The security problem doesn't exist in the patched shell script or
the Perl script. The Perl script also uses sendmail instead of
UCB Mail. What's the advantage that justifies the dependency on a
totally separate and otherwise unnecessary package? Couldn't the
same have been done in C and just compiled with the rest of INN?
>> The readability issue is your opinion only, and the line counts are both
>> unsubstantiated and unimportant to users.
>
> They're important to me.
Because they use more disk space? The scripts do the same thing as far
as the user is concerned, only one needs Perl, which might not already
be available and may be unwanted.
>> The scripts we're talking about have negligible performance impact when
>> considering the overall package. If performance was truly of major
>> importance they shouldn't be interpretted.
>
> *shrug* Matters to me. Perl is about 3 times slower than C for this, and
> several orders of magnitude easier to write for the sorts of things those
> scripts do.
I would agree with that attitude if these scripts were for your
personal use at your site only. Since INN is intended for use by
many, it is worth some extra time to accomplish a task in the best
manner rather than the quickest/easiest.
--
/*-------------------------------------------------------------*
* Peter James Naylor ## SysAdmin, Supernal Technologies, Inc. *
*-------------------------------------------------------------*
* pete@filter.supernal.net ## <http://www.supernal.net> *
*-------------------------------------------------------*/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads