xref: /plan9-contrib/sys/lib/fax/receiverc (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1#!/bin/rc
2spool=/mail/faxqueue
3recipients=/mail/faxqueue/faxrecipients
4faxowner=tor	#list of people to notify when unrecognizable fax comes in
5
6#
7# Arguments should be
8#	time Y|N pages [ftsi]
9#
10switch($#*){
11
12case 4
13case 3
14	{echo $*; echo FAX: page $spool/$1.'*'} | mail `{cat $recipients}
15case 0
16	{echo $*; echo FAX: no pages} | mail $faxowner
17case *
18	{echo $*; echo FAX: page $spool/$1.'*'} | mail $faxowner
19}
20