Subject: grepmail

From: Mike Miller <[email-masked]>
Date: Mon, 6 Sep 1999 00:09:52 -0500 (CDT)

A guy named Kevin Fonda <[email-masked]> (thanks, Kevin!) wrote to me
off line in reply to my posting (appended below).  Kevin recommended
grepmail, a perl script that I had not heard of before.  I have now tried
it and I find it very useful.  Grepmail will search multiple folders for
messages meeting certain criteria and it will send them to stdout, which
can be piped through grepmail again (if needed), and/or to a file which
can then be read in pine.  It's very nice.

The author of grepmail is a software engineering grad student named David
Coppit.  You can download grepmail from his web site:

http://www.cs.virginia.edu/~dwc3q/

Grepmail requires perl, and you have to alter the first line of the
grepmail script(s) to tell them where perl is.  For example, my first line
reads as follows:

#!/usr/local/bin/perl

Without changing the first line, the script won't run.

If you don't have perl, you can get it from www.perl.org

To get the man page for grepmail, run "pod2man" on the grepmail program
itself.  You can also try "pod2text" and "perldoc grepmail".

Mike

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

--------------------------------------------------------------------------

On Thu, 5 Aug 1999, Mike Miller wrote:

> I like the pine Select feature (using the semi-colon) and wish I could
> make even better use of it.  My problem is that I often have to find a
> collection of messages that are in different folders.  I end up having to
> reapply the same command in one folder after another.  If only PINE could
> search across multiple folders simultaneously!
> 
> Someone told that Pine 4.00 would implement this feature, and he directed
> me this docoment ("Changes from Pine 3.96 to 4.00"):
> http://www.washington.edu/pine/changes/3.96-to-4.00.html
> Where it says, "Select can search multiple folders."
> 
> >From what I see in using pine, this is not a very helpful feature.  It
> does allow me to identify folders that contain a certain string.  Of
> course, I could do essentially the same thing using "grep -il".  With grep
> commands I have more options (e.g., case-sensitivity).
> 
> What I want is something different.  I want to be able to do the same kind
> of Select (;) searching across folders that I can now do only within
> folders.  For example, I want to find every message with "Bob Thomas" in
> the "To:" field in the mail folders "199904", "199905", "199906" and
> "199907".  Right now I'd do it this way:
> 
> cat mail/19990[4567] > mail/findbob
> 
> Then I'd go into pine, make findbob my default folder, and do the select
> operation:
> 
> ;ttBob Thomas
> 
> It would be fabulous if Pine could give me the same result without having
> to create the mail/findbob folder.  Maybe it could show a pseudo-folder
> with listings like this:
> 
> 
> 199904:
>       1 Apr 22 Bob Thomas              (1,699) You owe me big for this one
> 
> 199905:
>       2 May 28 Bob Thomas              (2,524) I'll accept only cash
> 
> 199906:
> +     3 Jun  7 Bob Thomas              (2,040) Meet me in the lobby
>       4 Jun 29 Bob Thomas                (456) Where's my money?
> 
> 199907:
> +     5 Jul  8 Bob Thomas              (1,616) Pay me or you'll be sorry
> 
> 
> If I could then Select, Apply, etc. from there, that would be superb.  If
> pine will never do this for me, does anyone know of a program that does
> this now?
> 
> Regards,
> 
> Mike
> 
> 

-- 
    Kevin Fonda                  Email: [email-masked]
    5 Main St.                   Phone: (732) 223-2013
    Manasquan, NJ 08736          Fax  : (732) 223-3431
             LINUX, the choice of a GNU generation

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

---

From: Jim Sander <[email-masked]>
Date: Wed, 8 Sep 1999 10:13:38 -0400 (EDT)

Envision this: there are two classes of users on a system. Some have
normal shells and I'd like them to be able to avoid placing unnecessary
restrictions on them. Others are "email only" with pine as their login
shell and I don't want them getting sneaky on me and changing that, or
doing assorted other things that would be a pain.

   I can "lock down" things pretty effectively using pine.conf.fixed, but
this is inconvenient for a few people- specifically me. The only way I can
find around this is a fair amount of work. (compile a special version of
pine with options to use a different location for pine.conf.fixed and use
*that* executable for the restricted users)

   My ideal solution would be a way to use a different .fixed file for
each unix group. Maybe in my copious spare time (ha!) I'll hack pine to do
this, but I'm not energetic enough to start learning the intricacies of
the source code at this time. So, I'm looking for alternatives...

   Maybe I can remove access to the .pinerc files for the restricted users
and lock them down that way? To be effective that would of course require
changes to the modes of the users' home directories though. (can o' worms)

   Before I go to all the effort (and possibly miss something obvious) 
I'd appreciate any ideas and/or suggestions. Perhaps I'm missing something
in the docs? 

-=Jim=-

---

From: Jim Sander <[email-masked]>
Date: Fri, 10 Sep 1999 17:50:07 -0400 (EDT)

Quick recap on the problem: I want to restrict *some* users of pine
from doing "dangerous" things, but still allow everyone else to take full
advantage of the nifty features. Using pine.conf.fixed allows lots of
restrictions, but there is no way to selectively enforce these rules.

   Quick thanks to the people who responded to me privately: your ideas
were helpfull, but in the end I decided to do things "the hard way" - but
not as hard as a couple of you were trying to make it. :) 

   Just for future reference, here's what I did...

1. Compile pine like normal (in FreeBSD, I used the ports collection)
2. Install pine like normal
3. copy the pine4 port directory to say "rpine4"
4. modify the patches so that pine.conf.fixed is changed to what I want
   (this took about 3 minutes to find, 30 seconds to modify)
5. remake the port, rename the binary pine to "rpine"
6. install rpine into /usr/local 
7. set rpine as the login shell for email only people

   This means I made *minimal* changes, got what I needed done, and the
few regular pine users will be much happier. No wrappers, read-only files,
or anything of that sort required.

-=Jim=-

P.S. If anyone sees any problems with this setup, please do tell...