Subject: perl, grepmail

From: Mike Miller <[email-masked]>
Date: Mon, 13 Sep 1999 22:19:31 -0500 (CDT)

Pine Development Team (and others):

What do you think about adding an interface to external perl scripts in
the next release of pine (at least for Unix).  It could work like this:  
Users could enable a feature like grepmail...

[x] enable perl
[x] enable grepmail
[x] enable MHonArc

and pine could present an interface for the user to perform various tasks.
Programs like perl, grepmail, MHonArc, etc. would not be bundled with pine
and would have to be installed by the user or sysadmin.  Would that be a
good way to extend pine functionality without bloating pine itself too
much?  If pine could call other programs in the system to perform tasks,
it could do a lot more for us.

I especially like grepmail and I can see how that could be added to pine.

Regards,

Mike

-- 
Michael B. Miller, M.S., Ph.D., M.P.E.
Department of Psychology
210 McAlester Hall
University of Missouri--Columbia
Columbia, MO 65211
 Phone: (573) 882-5671
   Fax: (573) 882-7710
e-mail: [email-masked]
   web: http://taxa.psyc.missouri.edu/~mbmiller/

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Osman%Pine <[email-masked]>
Date: Wed, 15 Sep 1999 04:29:13 +0200 (CEST)

> I especially like grepmail and I can see how that could be added to pine.

I don't know grepmail...
But if they would impliment such behaviour they ought to do it in an
extensible way like:
[x] enable external tasks

And the system administrator should be the only one who can configure them
in "pine.conf.fixed". Otherwise it would introduce security problems.

And in that file it would be cfg'ed like eg:
external-task-menu=	"<text for item #1>",
			"<text for item #2>",
			"<text for item #3>",
			etc...
external-task-actions=	"<command for menu item #1>",
			"<command for menu item #2>",
			"<command for menu item #3>",
			etc...

And if "enable external tasks" is set you would get an option in your
screens to pop-up the defined menu.

TTYL.
-- 
Actually, Microsoft is sort of a mixture between the Borg and the Ferengi.

---

From: Timothy J Luoma <[email-masked]>
Date: Wed, 15 Sep 1999 10:33:13 -0400

Replying to message of Wed, 15 Sep 1999 04:29:13 +0200 (CEST)
	from Osman%Pine <[email-masked]> regarding ``Re: perl,
	grepmail''
	
> I don't know grepmail...  But if they would impliment such
> behaviour they ought to do it in an extensible way like:
>
> And the system administrator should be the only one who can
> configure them in "pine.conf.fixed". Otherwise it would introduce
> security problems.

Most of the sysadmins I've dealt with wouldn't even think of allowing
something like that because of the potential someone would hold
them liable for it.....  OR they wouldn't bother because they hadn't
had a chance to check it out.

I'd suggest putting a pine.conf.fixed entry that would disallow
them in general (aka "Allow Changing From") if they so desired.
But don't punish users who have sysadmins who can't be bothered
with little things that make users lives easier.

TjL

---

From: "Eduardo Chappa L." <[email-masked]>
Date: Thu, 16 Sep 1999 15:08:17 -0700 (PDT)

*** Timothy J Luoma ([email-masked]) wrote on Sep 15, 1999:

:) Replying to message of Wed, 15 Sep 1999 04:29:13 +0200 (CEST)
:) 	from Osman%Pine <[email-masked]> regarding ``Re: perl,
:) 	grepmail''
:) 	
:) > I don't know grepmail...  But if they would impliment such
:) > behaviour they ought to do it in an extensible way like:
:) >
:) > [x] enable external tasks
:) >
:) > And the system administrator should be the only one who can
:) > configure them in "pine.conf.fixed". Otherwise it would introduce
:) > security problems.
:) 
:) Most of the sysadmins I've dealt with wouldn't even think of allowing
:) something like that because of the potential someone would hold
:) them liable for it.....  OR they wouldn't bother because they hadn't
:) had a chance to check it out.

Actually pine can execute any external program that you want already, and
can imitate very closely what has already been suggested here. I don't see
why would anyone want to disable this behavior when it already has it and
no one has complained about it before.

Eduardo
http://www.math.washington.edu/~chappa/personal.html

---

From: Mike Miller <[email-masked]>
Date: Thu, 16 Sep 1999 18:31:24 -0500 (CDT)

On Thu, 16 Sep 1999, Eduardo Chappa L. wrote:

> Actually pine can execute any external program that you want already,
> and can imitate very closely what has already been suggested here. I
> don't see why would anyone want to disable this behavior when it
> already has it and no one has complained about it before.

Interesting.  I'm not sure what you have in mind, there's much to pine
that I don't know but I tried the following experiment...

I was reading your message and I used the pipe command '|' then entered
the following command:

; chmod a+x ~/.chsrc

I suppose I could have entered any command that I had permission to
execute.  Pine popped back saying that it had executed the command and
that there was no output.  Sure enough, my .cshrc file had been affected:

-rwxr-xr-x   1 mbmiller staff      14355 Sep  7 19:00 .cshrc*

Are there other ways to execute commands from pine?

This should be of interest to people who are trying to constrain their
users to a pine shell, but maybe they have this under control already.

Regards,

Mike

-- 
Michael B. Miller
University of Missouri--Columbia
http://taxa.psyc.missouri.edu/~mbmiller/

---

From: Timothy J Luoma <[email-masked]>
Date: Thu, 16 Sep 1999 23:58:12 -0400

Replying to message of Thu, 16 Sep 1999 18:31:24 -0500 (CDT)
	from Mike Miller <[email-masked]> regarding
	``Re: perl, grepmail''
	
> This should be of interest to people who are trying to constrain
> their users to a pine shell, but maybe they have this under
> control already.

I believe you can disable the 'pipe command' using a pine.conf.fixed file,  
but I'm not 100% sure

TjL

---

From: "Eduardo Chappa L." <[email-masked]>
Date: Fri, 17 Sep 1999 08:11:04 -0700 (PDT)

Hello,

  Ok, so here is what I was thinking of, I do not know if this could be
disabled by the sys-admin, I guess so, but since pine has had this feature
for so long and nobody has complained, I guess it must not bother
anyone...

  You can use any folder that you like first, but to make it more
believable, say you create a folder called "external". What external is
going to contain are going to be 1 line messages, which you can save there
by either sending them to yourself or postponing them and saving them
there or using your forms letter folder (if you have any).

  What the one line message is going to say is some kind of password, lets
say the one line says "GREPMAIL", because you want to execute grepmail (I
would use something more complicated, but I use this word just to fix
ideas). You can write in the subject of the message the program that you
want to activate.

  Now go to your configuration file and where it says "display-filters"
write

_LEADING(GREPMAIL)_ /full/path/to/grepmail _TMPFILE_

NOTE: I have never used grepmail, nor intend to. I do not know if grepmail
receives parameters or is interactive with menus and so on. If it receives
parameters then I would change the line above to a path to a script which
executes grepmail and would add the parameters in the above line, this is
just a model.

  The whole point is to ignore the parameter _TMPFILE_, I leave to you to
investigate why that is there.

  Something to look into is that if you receive a message with the leading
word GREPMAIL, then the filter will be activated, so you should use an
unlikely word or sentence.

  I do not intend to use this model for executing external programs, I
have no use for them now, but since people have been asking about them I
thought it would be useful for them to know. 

  Have a nice day,

Eduardo
http://www.math.washington.edu/~chappa/pine