Calendar
Joe Smith
jms at tardis.tymnet.com
Wed Jul 11 12:01:40 AEST 1990
In article <9574 at brazos.Rice.edu> rzh at icf.llnl.gov (R. Hanscom) writes:
>about 7 or 8 seconds apart. What determines if a machine sends out
>calendar mail (other than the fact that the user has a file called
>calendar with an entry for that day's date)?? How does calendar identify
>users -- from passwd, or aliases, or what?? Will a user get mail from
>every machine on the net that mounts his/her home directory, and runs
>calendar??
There are two calendar programs. /usr/bin/calendar is the top level
script, you can type it out to see how it works. If given an argument
(such as a single hyphen), /usr/bin/calendar does everyone's calendar
file.
/usr/lib/calendar is an executable binary. If invoked with no arguments,
it creates a file for egrep to use to match lines with today's date. If
invoked with the name of a file, it returns true of the file is NOT on an
NFS mounted system. The idea is so that if the home directories are cross
mounted on several file servers, mail to a specific user will only come
from the local file server.
The version of /usr/bin/calendar for SunOS-4.1 optimizes the search for
local home directories by adding a grep command to the ypcat command:
caldata="/bin/ypcat passwd.byname | grep /home/`hostname`"
That plus the "sort -u -" eliminated duplicate mailing on our system.
Joe Smith (408)922-6220 | SMTP: jms at tardis.tymnet.com or jms at gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C41 | BIX: smithjoe | 12 PDP-10s still running! "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."
More information about the Comp.sys.sun
mailing list