.\" $Id$ .\" .\" HylaFAX Facsimile Software .\" .\" Copyright (c) 1993-1996 Sam Leffler .\" Copyright (c) 1993-1996 Silicon Graphics, Inc. .\" HylaFAX is a trademark of Silicon Graphics .\" .\" Permission to use, copy, modify, distribute, and sell this software and .\" its documentation for any purpose is hereby granted without fee, provided .\" that (i) the above copyright notices and this permission notice appear in .\" all copies of the software and related documentation, and (ii) the names of .\" Sam Leffler and Silicon Graphics may not be used in any advertising or .\" publicity relating to the software without the specific, prior written .\" permission of Sam Leffler and Silicon Graphics. .\" .\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. .\" .\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR .\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, .\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, .\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF .\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE .\" OF THIS SOFTWARE. .\" .if n .po 0 .ds Fx \fIHyla\s-1FAX\s+1\fP .TH FAXRCVD 8 "May 28, 2001" .SH NAME faxrcvd \- \*(Fx notification script for received facsimile .SH SYNOPSIS .B /var/spool/hylafax/bin/faxrcvd .I qfile .I devid .I commid .I error-msg [ .I callid-1 [ .I callid-2 [ .I ... [ .I callid-n ] ] ] ] .SH DESCRIPTION .B bin/faxrcvd is the command script invoked by the facsimile server whenever a facsimile is received. The default script sends electronic mail to the .I FaxMaster user describing the content of the facsimile and other useful information such as the time spent receiving the document. The arguments are: .TP 10 .B qfile the pathname of the received .SM TIFF file relative to the root of the spooling hierarchy. .TP .B devid the modem device on which the facsimile was received. .TP .B commid the communication identifier for the inbound call. .TP .B error-msg an error message that is non-null if an error was encountered during the receive operation. .TP .B callid the value of various identification indicators from the call .SH NOTES This script can route facsimile directly to the intended recipient. To do this create a shell script .B etc/FaxDispatch in the spooling area that sets .I SENDTO to the receiver's electronic mail address. For example, .sp .nf .ft C \s-1case "$SENDER" in *1*510*526*1212*) SENDTO=sam;; # Sam's test rig in Berkeley *1*415*390*1212*) SENDTO=raster@asd;; # 7L Xerox room, used for scanning *5107811212) SENDTO=peebles@mti;; # stuff from home esac case "$DEVICE" in ttyS1) SENDTO=john;; # all faxes received on ttyS1 ttyLT0) SENDTO=mary@home;; # all faxes received on ttyLT0 esac case "$CIDNUMBER" in 435*) SENDTO=lee; FILETYPE=pdf;; # all faxes from area code 435 5059627777) SENDTO=amy; FILETYPE=tif;; # Amy wants faxes in TIFF esac\s+1 case "$SUBADDR" in 53) SENDTO=FaxMaster;; # without double-notification roger) SENDTO=roger;; # possible text subaddressing esac\s+1 .ft R .fi .sp Note that you must match any embedded white space. The facsimile will be sent as a MIME-encoded PostScript document as default. .TP .I CALLIDn is equivalent to the nth call identification parameter .TP .I CIDNAME is equivalent to .B CALLID2 above. .TP .I CIDNUMBER is equivalent to .B CALLID1 above. .TP .I DEVICE is equivalent to .B device above. .TP .I FILETYPE controls the filetype of the image attachment. Current filetype options are ``ps'', ``tif'', and ``pdf''. Multiple values may be specified by separating them with whitespace. In that case a separate attachment is created for each filetype. .TP .I FROMADDR controls the sender of the received fax notification. It is given as an e-mail address. .TP .I MSG is equivalent to .B error-msg above. .TP .I NOTIFY_FAXMASTER (an underscore ``_'' character is between NOTIFY and FAXMASTER) indicates whether or not the HylaFAX administrator should be notified regarding incoming facsimile. Default is ``always''. Also available are ``never'', which means to never send any received facsimile notification, and ``errors'', which means to send notification only if there were reception errors. .TP .I SENDER is the received TSI of the fax sender. .TP .I SENDTO controls the recipient of the received fax notification. It is given as an e-mail address, and it's value will be passed directly to the MTA for delivery as well as being inserted into the email. If you want to send to multiple receipients in separate messages set the variable SENDTO1...SENDTOn in addition to SENDTO. faxrcvd will process additional SENDTOn variables starting at 1, and stopping at the first empty SENDTOn variable it finds. The templates should continue to reference $SENDTO, and faxrcvd will make sure it gets set correctly as the template is processed for each one. .TP .I SUBADDR the received subaddress value, communicated by the sender for post-reception routing purposes .TP .I TEMPLATE the template subdirectory to use when sending e-mails. HylaFAX ships with a base set of templates, and some direct translations. To use the German translated templates, set TEMPLATE=de in FaxDispatch. This is relative to the base template directory. .TP Other shell variables are available. Consult the faxrcvd script directly. .SH FILES .nf .ta \w'/var/spool/hylafax/etc/templates 'u /var/spool/hylafax spooling area /usr/sbin/faxinfo for printing information about the facsimile /usr/bin/fax2ps for converting \s-1TIFF\s+1 to PostScript /usr/lib/sendmail for delivering mail /var/spool/hylafax/etc/templates/ base directory for outgoing e-mail templates .fi .SH "SEE ALSO" .IR faxd (8), .IR hylafax-server (5), .IR recvq (5)