Automatically print incoming faxes
To automatically print incoming faxes to lpr, insert a line of code similar to
/usr/bin/tiff2ps -a $FILE | lpr
into your $SPOOL/etc/FaxDispatch script, assuming that your printer is PostScript compatible.
Dieter Kluenter dkluenter@gmx.de has added at line 112 of faxrcvd these lines for his printing:
if [ -n "$SENDTO" ]; then echo "" echo "The facsimile was automatically dispatched to: $SENDTO." else $TIFFBIN/fax2ps $1 | lpr -Plp fi
Michael mwu@mail2.tercel.com.tw states:
Our printing environment is specific, a shared HP LJ1100 (A4 only). To be able to print out various types of paper sizes, we use the following code for printing (0.95 * A4 size):
/usr/bin/tiff2ps -a -h 11.1082 -w 7.8543 $FILE | /usr/bin/lpr
If we use fax2ps, it would be complicated to handle the printouts of different paper sizes.
For more than one printer:
If you have some departments or users with their own faxnumbers and want print out the incoming fax messages near by, you can make this changes in $SPOOL/etc/FaxDispatch:
## and/or by device case "$DEVICE" in ttyIAX0) SENDTO=name@your-domain.com # all faxes received on ttyIAX0 PRINTER=hplj1320 # Print document with printer= ;; esac
And do this changes in bin/faxrcvd at line 199 for HylaFAX Version 4.3.1:
if [ -n "$SENDTO" ]; then # Create the document to attache if [ -z "$MSG" ]; then MailWithFAX success else MailWithFAX error fi # If $PRINTER not empty, then print $FILE with $PRINTER if [ -n "$PRINTER" ]; then $FAX2PS $FILE | lpr -P$PRINTER fi else # If $PRINTER not empty, then print $FILE with $PRINTER if [ -n "$PRINTER" ]; then $FAX2PS $FILE | lpr -P$PRINTER fi fi
From Dietmar Simons (http://www.simons-it-service.de)