Fax2Serve
Installation Instructions

I'm going to To setup and install Fax2Serve you need to complete the following steps:
  1. Install and configure the OS
  2. Setup hardware.
  3. Setup Mgetty+SendFax to receive faxes.
  4. Setup Mgetty+SendFax to send faxes (if needed).
  5. Install and configure Fax2Serve.
  6. Setup Samba to get at files from a Windows machine for maintenance (optional).


Install and configure OS.
I have been installing Red Hat Linux. My current installations of Red Hat running Fax2Serve are release 8 and 9. What I recommend for setting up Fax2Serve is the following:
  1. Install as server.
  2. In setting up partitions, setup /opt and /var/www/html as separate partitions. This way if you need to re-install the the OS, you don't lose your software install and web archive.
  3. Select the following modules:
    1. Install X-Windows, KDE or Gnome (or both).
    2. Install Apache web server.
    3. Install Graphics conversion utilties.
    4. Install Windows file sharing (ie. Samba).
    5. Install tools and sources. (So you can compile drivers if needed.)
  4. Setup a static IP address.
  5. Setup to start in graphical mode.
  6. Allow it to create a bootable repair disk if you want.
  7. Setup print queues using standard driver queues if you have CUPS printing. If you don't have CUPS printing, modify the g3toprn file to use the alternate printing method and make sure that all your printers support PCL.
  8. Install Sun's 1.4.x JVM from java.sun.com. After installing, modify the .bash_profile in your user directory to set the JAVA_HOME environment variable and put the JAVA executables in the path. Your .bash_profile may look something like this:
  9. Log out and log back in to setup your environment, and then test to see if Java is working as needed. After typing in the following command you should see the following:


Setup hardware.
If you are going to only use the two default serial ports off the motherboard or standard serial IO card, all you need to do is plug in your modems. If you use some other type of serial port controller card such as a Digiboard or Comtrol RocketPort you will most likely need to manually install drivers so that MGetty+SendFax can use them. The example I'm giving is how I setup my 16-port Comtrol RocketPort board:
  1. Download the drivers off the vendor's web site. Comtrol's drivers come in source code format which need to be compiled and then installed.  After doing a search for PCI cards, drivers, and Linux I searched for the RocketPort/PCI driver and downloaded 1800024G.tgz from http://support.comtrol.com/download.asp to my /opt/download/ directory.
  2. I decompressed the archive using gzip (ie. gzip -d 1800*).
  3. I un-tarred the file using tar (ie. tar -xvf 18000G.tar).
  4. I then changed into the /opt/download/comtrol/ directory and did a listing.
  5. By all rights you should just type the make command and you would be done. The only problem with this is that there are two lines in the Makefile that need to be modified so that when "make" is run everything will compile. Red Hat Linux stores the include files needed by make in a different directory than what is configured in the "Makefile" file. First, change to the /usr/src directory and you will see linux with some numbers after it. This is basically the change you need to make in the Makefile. Every place where you see /usr/src/linux/include/... change it to /usr/src/linux-2.4.20-8/include/... (or whatever the number is).
  6. Run make clean (ie. make clean). If you get a command not found, you didn't install the tools and sources as required. Either figure out how to manually install them or re-install the OS and start over.
  7. Run make without any parameters to create the drivers.
  8. Install the drivers by running the setup.sh script which will copy the drivers and setup Linux to load them automatically. (To run setup.sh type ./setup.sh in the /opt/download/comtrol/ directory or type out the full path /opt/download/comtrol/setup.sh from anywhere.)
  9. Restart the OS and you should see Comtrol RocketPort load and all the device names enumerated (ie. ttyR0, ttyR1, etc.


Setup MGetty+SendFax for receiving faxes.

MGetty+SendFax doesn't install by default. It may also be helpful to install Linuxconf to ease configuration of MGetty+SendFax.

  1. Insert the distribution CD into your CD drive with the MGetty+SendFax RPM on it. (With Red Hat 9, this is on the second CD-ROM.)
  2. Mount the cdrom (ie. mount /dev/cdrom).
  3. Change to the RPM directory on the CD-ROM. cd \mnt\cdrom\RedHat\RPMS
  4. Check to see if the MGetty+SendFax files are in the directory by using ls (ie. ls mget*).
  5. To install the MGetty+SendFax modules use the RPM command (ie. rpm -ivh mget*).
If you want to use an easier method of setup, you can install Linuxconf which gives a GUI interface to MGetty+SendFax. (Linuxconf used to come with Red Hat in previous versions, but because of bugs in the network configuration utilties it was dropped.)
  1. Go to the LinuxConf web site at: http://www.solucorp.qc.ca/linuxconf/.
  2. Select Download off the left-hand menu.
  3. Select your distribution, language and hit the "Submit Query" button.
  4. From your preferred site, download all the modules into a directory called /opt/download/linuxconf/.
  5. Change to the /opt/download/linuxconf/ directory and install using the RPM command (ie. rpm -ivh *).
  6. Either start Linuxconf from a telnet session (ie. linuxconf), or create a desktop icon labeled LinuxConf that calls the program linuxconf.
  7. The first time Linuxconf runs it gathers all sorts of information and I just click on it until the program shows up on the screen.
  8. To configure Linuxconf to manage MGetty+SendFax, select the "Control" tab and expand the "Linuxconf management" branch. Under the "Linuxconf management" branch you should see a sub-heading called "Modules."
  9. When "Modules" is selected you should see a list of modules to the right that Linuxconf can manage. Scroll down until you see "mgettyconf" and check it. You will also see "modemconf" listed, but we won't be needing it.
  10. Exit from the Linuxconf program and restart it.
  11. When Linuxconf is restarted, select the "Config" tab, expand the "Networking" branch, under "Networking" expand the "Server tasks" branch, and then under the "Server tasks" branch you will se a new sub-heading named "serial port setup (mgetty)" which is where we can configure MGetty+SendFax.
To configure MGetty+SendFax using Linuxconf follow these steps:
  1. Select the sub-heading "Serial port defaults" under the "Serial port setup (mgetty)" heading. The only thing I normally change here is the baud rate. I leave everything else to defaults (ie. blank).
  2. Select the sub-heading "Fax settings" under "Serial port setup (mgetty)" heading. The only thing I ever change here is the Fax id. Change it to your company name or fax number.
  3. Select the sub-heading "Serial ports" under "Serial port setup (mgetty)" heading. This is where we get busy setting up all the serial ports and modems that will be attached to this server. Hit the "Add" button for each serial port to configure.
  4. In the serial port configuration setup following:
    1. Setup the correct device name for your serial port. If you are using standard serial ports (ie. COM1 or COM2), use /dev/ttyS0 or /dev/ttyS1. If you are using a Comtrol RocketPort your ports would normally start at /dev/ttyR0 and go until the last port on your board which if you had a 16 port device would be /dev/ttyR15.
    2. I always like to setup the "Baud rate" at 115200.
    3. On newer modems I setup the modem as cls2.0 in the "Modem type."
    4. The only other settings I mess with is under the "Runlevels" tab and I check levels 3 and 5 as when I want the modems to initialize.
    5. Accept the settings and repeat until you have installed all the modems you are going to have on this server.
  5. You are basically done with MGetty+SendFax. Just restart Linux and all your modems should initialize and be ready to start receiving faxes.
To configure MGetty+SendFax manually you need to edit two files; initttab in the /etc/ directory, and mgetty.conf in the /etc/mgetty+sendfax/ directory.
  1. Add the modem init commands to the inittab file by adding the following lines for a COM1, COM2, and the fourth port on a Comtrol RocketPort (examples). Don't mess with the other lines ...
  2. Here is an example mgetty.conf file for the same three modems and a fax id of "Fax Sender". I put in a modem type lf cls2.0 (which all new modems should support), which you can leave out and the software will auto-detect the modem as Linux boots up.
Reboot your server and test MGetty+SendFax to see if it will receive a fax. Once a fax is received it should appear as a file in the /var/spool/fax/incoming/ directory and should look something like: ffefb621711-800-975-4401.01

Setup MGetty+SendFax for sending faxes.

  1. Setup faxrunq to process outgoing faxes.
  2. Modify the /etc/mgetty+sendfax/sendfax.config file as needed.
  3. Modify the /etc/mgetty+sendfax/mgetty.config file as needed.
  4. Restart Linux to make effective your changes.
  5. Fax2Serve keeps a log file called Fax2Send.log in the Fax2Serve program directory. Each fax sent is logged and can be viewed by any program capable of viewing a Unicode (Big Endian) text file. At the command prompt in Linux you can simply cat the file to the console. If you are accessing it from Windows you will need an application that can handle Unicode.

Install and configure Fax2Serve.

A - Install using Install Anywhere executable:

  1. Verify Java environment (if you are going to download the Fax2Serve without the Java VM).
  2. Verify faxes can be received.
  3. Download f2s20031024LinuxNoVM.bin (or f2s20031024LinuxVM.bin if you didn't configure Java manually) from http://sourceforge.net/projects/fax2serve/ into the /opt/ directory.
  4. Use the chmod command to make the bin file executable file (ie. chmod +755 fax2serve*).
  5. Run the downloaded installer executable
  6. Select to have the application installed to the /opt/fax2serve/ directory.
  7. Select to have the startup script installed to the /opt/ directory.
  8. Run the fax2serve script file which will setup the Java class path and start the application. If you are running Red Hat Linux 8 or 9, and installed, the default paths should work. If not you will need to change the program settings which can be found under the File pull-down menu.
  9. Setup the ports as needed.
  10. Send a test fax and verify that Fax2Serve routes the fax as expected.

B - Install using platform independent archive:

  1. Verify Java environment.
  2. Verify faxes can be received.
  3. Download f2s20031024.tgz from http://sourceforge.net/projects/fax2serve/ into the /opt/fax2serve directory.
  4. Decompress using gzip (ie. gzip -d f2s2003*).
  5. Un-tar the archive using tar (ie. tar -xvf f2s20031024.tar).
  6. Run the fax2serve script file which will setup the Java class path and start the application. If you are running Red Hat Linux 8 or 9, and installed, the default paths should work. If not you will need to change the program settings which can be found under the File pull-down menu.
  7. Setup the ports as needed.
  8. Send a test fax and verify that Fax2Serve routes the fax as expected.


Setup Samba to get at files from a Windows machine for maintenance (optional).
  1. Create Linux users that will match usernames that will log into your Linux box from Windows machines.
  2. Run the services tool to setup Samba to auto start and start the SMB daemon.
  3. Modify the smb.conf file (usually in the /etc/samba/ directory) as follows for simple SMB connections from Windows machines. I'm only showing what I have modified to make this work.
  4. Restart the SMB services after updating your smb.conf file as needed by typing:
  5. Create Samba users using the smbpasswd program as follows for each user. In keeping with the above example I show jimbob as being created:
  6. From Windows you can now map to your server. If you named your server fax2serve, you could map to the "opt" share by using the Windows explorer or by using the net command at the MS-DOS or command prompt:
  7. I setup this example to be simple and fairly secure. There are many options to Samba where you can custimize Samba to your particular needs, so have fun!

SourceForge.net Logo