/usr/spool/mail filter/editor?

Hi Ho Silver silver at xrtll.uucp
Sun Jan 20 07:09:57 AEST 1991


In comp.unix.shell, nichols at en.ecn.purdue.edu (Scott P Nichols) typed:
$I am interested in a shell script that will, upon execution, view
$the contents of the /usr/spool/mail/lname file and remove any mail
$from a certain user or list of users.  I'm sure it has been done
$many times, but I don't have the skills yet to write it on my own.

   Depending on your mailer, the easiest way to do this may well be
simply to run mail -u lname with the following redirected to its input:

d whoever-is-to-be-deleted
q

   The dumb mailer that comes with Xenix, for example, allows you to
delete messages from a person as above.  Heck, if you wanted to, you
could even put it into a here document and make about a four-line shell
script out of it.
-- 
 __            __  _  | ...!nexus.yorku.edu!xrtll!silver |  always
(__  | | |  | |_  |_) >----------------------------------< searching
 __) | |_ \/  |__ | \ | if you don't like my posts, type |    for
_____________________/  find / -print|xargs cat|compress |   SNTF



More information about the Comp.unix.shell mailing list