home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / doc / HOWTO / mini / Fax-Server < prev    next >
Text File  |  1997-10-13  |  4KB  |  154 lines

  1.  
  2.       Linux simple fax printer server mini-HOWTO (faxsrv-mini-HOWTO)
  3.  
  4.  
  5. Author: Erez Strauss <erez@newplaces.com>
  6. Version 0.002, last update: Sep 24, 1997
  7.  
  8. No warnties, comments are always welcome.
  9.  
  10. This file describes one of the simples way to set fax server on
  11. your Linux system.
  12. I was only interested in sending faxes, as I already have fax machine ;-)
  13. There are more complete fax systems and more complex, but ...
  14.  
  15. Questions:
  16.  
  17. Q1. What is a fax printer server ?
  18. Q2. How To set it up ?
  19. Q3. How do I use it, from the server ?
  20. Q4. Where do I specify the target Fax number ?
  21. Q5. How do I use it from other Unixes on the net ?
  22.  
  23.  
  24. Q1. What is a fax printer server ?
  25. A1. A fax printer server is a setup of few programs:
  26.     efax, and the print server, in such a way that sending a fax from
  27.     the computer is as simple as printout.
  28.  
  29. Q2. How To set it up ?
  30. A2. Setting efax as fax print server includes few problems
  31.     As I worked it out few times, I decided to collect this wisdom
  32.     in this small mini-HOWTO, comments are welcome at <erez@newplaces.com>.
  33.     I describe them here and the solutions, and all the
  34.     instruction in short steps:
  35.  
  36.     2.0 make sure you have the efax package.
  37.       on RPM based system use the command 'rpm -qv efax'.
  38.  
  39.       You can get the efax sources in tar.gz format from sunsite:
  40.       ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08.tar.gz
  41.       or binary rpm package:
  42.       ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm
  43.     2.1. The efax documentation is missing the :  at the end of
  44.          the printcap entry.
  45.      Solution:
  46.         Add the following /etc/printcap entry:
  47.  
  48. fax:\
  49.         :lp=/dev/null:\
  50.         :sd=/var/spool/fax:\
  51.         :if=/usr/bin/faxlpr:
  52.  
  53.     2.2. Use hard link and not symbolic link to the fax command
  54.  
  55.      ln /usr/bin/fax /usr/bin/faxlpr
  56.  
  57.     2.3. edit the /usr/bin/fax to your preferences:
  58.    
  59.    choose the right Fax Class for your modem:
  60.    CLASS=2.0
  61.    Set the FROM="your international phone number"
  62.    NAME="Your Name"
  63.    Add the line for conversion of international phone number to local
  64.    for example in Israel you would use:
  65.    TELCVT='sed -e s/+972/0/ -e s/+/00/'  # Israel
  66.  
  67.    There is a problem in the file in line 586, change the
  68.    cfile=... with the following two lines:
  69.  
  70.  
  71.         cfile=`/usr/bin/tail -1 lock`
  72.         cfile=`cat $cfile`
  73.  
  74.    at lines 586,587 there shouldn't be '-' signs the lines are:
  75.  
  76.        0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;;
  77.        *) echo "$l" | mail -s "fax to $num failed   " $user@$host ;;
  78.  
  79.    2.4. create the directory /var/spool/fax
  80.  
  81.      mkdir /var/spool/fax
  82.      chmod 777 /var/spool/fax
  83.  
  84.    2.5. The lock file (/var/spool/fax/lock) is being created with
  85.      incorrect permissions, use the following command to set it correctly:
  86.  
  87.      touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock
  88.  
  89.    2.6. the efax program is expecting real device file at the /dev/modem
  90.    and will not work with symbolic link, so create a device file
  91.    with the same major and minor number as the /dev/cua? the is
  92.    connected to the modem
  93.   
  94.    ls -lL /dev/modem 
  95.    rm /dev/modem
  96.    mknod /dev/modem c Mj Mi
  97.  
  98.    Mj is 5, and Mi is 64 for the cua0, 65 for cua1 and so on.
  99.    For example (for cua1):
  100.  
  101.    mknod /dev/modem c 5 65
  102.  
  103.    2.7. change the mode at the /var/lock directory
  104.  
  105.    chmod 1777 /var/lock
  106.  
  107.  
  108. Q3. How do I use it, for the server ?
  109. A3. You should use the fax printer using the -P option
  110.     and the -J option with the fax number.
  111.  
  112.     use the following lpr commands:
  113.     
  114.     lpr -Pfax -J <Fax-Number> [file-names]
  115.  
  116.     or
  117.  
  118.     any command | lpr -Pfax -J <Fax-Number>
  119.  
  120. Q4. Where do I specify the target Fax number ?
  121. A4. After the -J option.
  122.  
  123.  
  124. Q5. How do I use it from other Unixes on the net ?
  125. A5. Add the following entry into the /etc/printcap file and the client
  126.     Linux systems, create the spool directory, and so on ...
  127.  
  128. fax:\
  129.         :sd=/var/spool/fax:\
  130.         :mx#0:\
  131.         :sh:\
  132.         :rm=host.domain:\
  133.         :rp=fax:
  134.  
  135.  add the name of the client hosts into the /etc/hosts.lpd on the
  136.  fax server machine.
  137.  
  138.  
  139.  use it as before.
  140.  
  141.  
  142. Note:
  143.  
  144.  The header string that efax adds to the fax pages is not effected
  145.  by the user name that sends the fax. (can be updated).
  146.  
  147.  
  148. To contact me:
  149.  
  150. Erez Strauss
  151. erez@newplaces.com
  152. http://www.newplaces.com/linux/
  153. http://www.newplaces.com/
  154.