Cmail - check to see who's read their mail - UNIX

Steve Benz steveb at cs.utexas.edu
Wed Oct 25 03:09:40 AEST 1989


tchrist at convex.COM (Tom Christiansen) writes:
 [ In response to the people-who-don't-read-mail-checker ]
>
>Sigh.  Yet another piece of system administrative hackery written in C...
>it seems like terrific overkill
>to do this in C.  So as an exercise, I rewrote the program in perl (version
>3.0).

While I certainly find your program preferable to the original,
I question your choice of Perl instead of a shell script.
Granted, your Perl program would be faster on some systems, but
(at the risk of making a baseless assertion) the Bourne shell is
the standard language for writing administrative hackery.

>...Two comments on the
>original C code: doing getpwent()s until you run out is terribly innefficient
>on systems with long passwd files; mine is ~1300 lines long, and it would be
>better to do readdir()s on SPOOL and then getpwnam()s on the results.

Yes, but don't be so sure that:

- There aren't multiple spool directories--a common situation where
  workstations are involved.
- There even is a spool directory at all--The new mail system here (& many
  other sites, I believe) keeps mailboxes in the home directory of the user.

					- Steve



More information about the Alt.sources.d mailing list