The fax program on ANSI C/POSIX - efax is small and simple, espacially nice for single user systems, which supports Class 1, 2 or 2.0 fax modems, whereas mgetty+sendfax does not support Class 1 modems. See the original efax page.
Here is the enhanced version including bugfix of 'fax start/stop' command in auto answer mode, and improved faxlpr that use two directories separately as INCOMINGDIR for the recieving faxes by auto answer mode and OUTGOINGDIR for the sending faxes with spooling. Now, the faxlpr in the newly patched fax script works with LPRng used in some current systems like Red Hat Linx 7.x. And the new feature of efax-0.9a001114a6 enables to send fax via samba from remote hosts running Microsoft-Windows. Try this new version.
FROM="your Fax number" NAME="your name"
(If the modem device is /dev/ttyS0) # chmod 666 /dev/ttyS0 # ln -s /dev/ttyS0 /dev/modem
s1:345:respawn:/bin/sh /usr/bin/fax answer
# /usr/doc/efax*/ppxpadduser username
FROM="your Fax number" NAME="your name" INCOMINGDIR=/var/spool/fax/incoming OUTGOINGDIR=/var/spool/fax/outgoing(Do not use ~/.efaxrc. It does not affect when efax run as a daemon.)
(If the modem device is /dev/cua1) # chmod 666 /dev/cua1 # ln -s /dev/cua1 /dev/modem
# chmod 777 /var/lock # mkdir -p /var/spool/fax/incoming # chown root.uccp /var/spool/fax/incoming # chmod 775 /var/spool/fax/incoming # mkdir -p /var/spool/fax/outgoing # chown lp.lp /var/spool/fax/outgoing # chmod 770 /var/spool/fax/outgoing # touch /var/spool/fax/outgoing/lock # chmod 644 /var/spool/fax/outgoing/lock # mkdir -p /var/log/fax # chmod 777 /var/log/fax
# ./ppxpadduser username
# ln -s /usr/bin/fax /usr/bin/faxlpr
##PRINTTOOL3## LOCAL fax:\ :sd=/var/spool/fax/outgoing:\ :mx#0:\ :sh:\ :lp=/dev/null:\ :if=/usr/bin/faxlpr:
# /etc/rc.d/init.d/lpd restartor
# kill $(/sbin/pidof lpd) -1
s1:345:respawn:/bin/sh /usr/bin/fax answer
$ fax make doc.ps
doc.ps.001, doc.ps.002 etc. will be created. These files are tiffg3 format, and you can look them up by using xloadimage, kfax, or ghfaxveiwer.
$ fax send 03-3999-9999 doc.ps.0*
$ lpr -P fax -J 03-3999-9999 doc.ps
On the remote host (bar), make a remote printer named like 'fax', remote host name to be of the host efax running (foo), remote queue 'fax' and use 'postscript printer' as the print filter. Now you can use on the host bar same as local,
$ lpr -P fax -J 03-3999-9999 doc.ps
Install and run samba on the host efax is running (foo). Confirm the host(foo) and the fax can be seen from the windows machine(win) in the Network-Computers. On the windows machine(win), make a remote printer named like 'samba-fax', selecting remote printer 'fax' under the host efax and samba is running(foo), and use 'Postscript Printer' as the printer model.
On the windows machine(win), save the document as the file neme is the same as the fax number as like '03-3999-9999.doc' . The extention can be '.doc' if the document is a Microsoft-Word document.
Print the file '03-3999-9999.doc' selecting the remote printer 'samba-fax'.
When a fax call comming, type
$ fax receiveReceived fax file will be put in the current directory.
Use '_043' in place of '#', and '_052' in place of '*'. For example, '_0431_0522' means '#1*2'.
E-mail to tkscanfax <shino@pos.to> for questions, comments or suggestions.