Linux simple fax printer server mini-HOWTO (faxsrv-mini-HOWTO) Author: Erez Strauss Version 0.002, last update: Sep 24, 1997 No warnties, comments are always welcome. This file describes one of the simples way to set fax server on your Linux system. I was only interested in sending faxes, as I already have fax machine ;-) There are more complete fax systems and more complex, but ... Questions: Q1. What is a fax printer server ? Q2. How To set it up ? Q3. How do I use it, from the server ? Q4. Where do I specify the target Fax number ? Q5. How do I use it from other Unixes on the net ? Q1. What is a fax printer server ? A1. A fax printer server is a setup of few programs: efax, and the print server, in such a way that sending a fax from the computer is as simple as printout. Q2. How To set it up ? A2. Setting efax as fax print server includes few problems As I worked it out few times, I decided to collect this wisdom in this small mini-HOWTO, comments are welcome at . I describe them here and the solutions, and all the instruction in short steps: 2.0 make sure you have the efax package. on RPM based system use the command 'rpm -qv efax'. You can get the efax sources in tar.gz format from sunsite: ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08.tar.gz or binary rpm package: ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm 2.1. The efax documentation is missing the : at the end of the printcap entry. Solution: Add the following /etc/printcap entry: fax:\ :lp=/dev/null:\ :sd=/var/spool/fax:\ :if=/usr/bin/faxlpr: 2.2. Use hard link and not symbolic link to the fax command ln /usr/bin/fax /usr/bin/faxlpr 2.3. edit the /usr/bin/fax to your preferences: choose the right Fax Class for your modem: CLASS=2.0 Set the FROM="your international phone number" NAME="Your Name" Add the line for conversion of international phone number to local for example in Israel you would use: TELCVT='sed -e s/+972/0/ -e s/+/00/' # Israel There is a problem in the file in line 586, change the cfile=... with the following two lines: cfile=`/usr/bin/tail -1 lock` cfile=`cat $cfile` at lines 586,587 there shouldn't be '-' signs the lines are: 0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;; *) echo "$l" | mail -s "fax to $num failed " $user@$host ;; 2.4. create the directory /var/spool/fax mkdir /var/spool/fax chmod 777 /var/spool/fax 2.5. The lock file (/var/spool/fax/lock) is being created with incorrect permissions, use the following command to set it correctly: touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock 2.6. the efax program is expecting real device file at the /dev/modem and will not work with symbolic link, so create a device file with the same major and minor number as the /dev/cua? the is connected to the modem ls -lL /dev/modem rm /dev/modem mknod /dev/modem c Mj Mi Mj is 5, and Mi is 64 for the cua0, 65 for cua1 and so on. For example (for cua1): mknod /dev/modem c 5 65 2.7. change the mode at the /var/lock directory chmod 1777 /var/lock Q3. How do I use it, for the server ? A3. You should use the fax printer using the -P option and the -J option with the fax number. use the following lpr commands: lpr -Pfax -J [file-names] or any command | lpr -Pfax -J Q4. Where do I specify the target Fax number ? A4. After the -J option. Q5. How do I use it from other Unixes on the net ? A5. Add the following entry into the /etc/printcap file and the client Linux systems, create the spool directory, and so on ... fax:\ :sd=/var/spool/fax:\ :mx#0:\ :sh:\ :rm=host.domain:\ :rp=fax: add the name of the client hosts into the /etc/hosts.lpd on the fax server machine. use it as before. Note: The header string that efax adds to the fax pages is not effected by the user name that sends the fax. (can be updated). To contact me: Erez Strauss erez@newplaces.com http://www.newplaces.com/linux/ http://www.newplaces.com/