How To Set Up A Debian Linux Fax Server
The material on this page was prepared using Sarge or Etch
configured using our Installation and Packages pages.
If you did not use our pages to set up your system, what you
encounter on your system may be different than what is given here.
If you've ever used a program like WinFax you know how convenient it is to use your fax-modem to send a fax. There's no need to print out a hard-copy and stuff that into a stand-alone fax machine. A fax server makes a fax-modem available to all users on a network and they can use fax client software on their workstations to submit their fax jobs to the server.
HylaFAX is a free fax server program (consisting of several daemons) that runs on a Debian Linux system. Even though the HylaFAX software is running on a Linux system, client software for it is available for Windows and Macintosh systems. In some cases the fax client is simply a logical printer. When the user "prints" their document to this printer it gets redirected to the fax server. A fax server can be a real paper saver for organizations that send a lot of outbound faxes.
Because there is no way to address a fax to a given individual in an organization (i.e. the only recipient "address" for a fax is the fax phone number), HylaFAX handles received faxes using e-mail. First, the received fax is converted to a .TIF, .PDF, or PostScript file. It then sends an e-mail to a user listed in the configuration with an FTP link to the file. You could also have HylaFAX attach the file to the e-mail. (Note that these e-mail options would require you to have Sendmail installed and configured on the fax server.)
An alternative to the e-mail method would be to set up HylaFAX to automatically print all received faxes to an lpr printer (see the LAN Servers page on how to set up an lpr printer on your fax server - it's not hard). The printer would have to have PostScript capability, and this method doesn't offer any reduction in paper usage for received faxes, but it does negate the need for a separate fax machine (and its associated toner/ink supplies).
Setting Up The Server
Once you have a fax-modem connected to your system (see more about connecting a modem to your Debian system on the Modems page) you install the HylaFAX package with the command:
apt-get install hylafax-server
During the installation you'll be asked to insert numerous CDs. After the installation is complete you'll need to run a couple configuration utilities. Have your modem hooked up before proceeding. At the shell prompt type in the command:
and press Enter and you'll see a lot of text fly by. Answer Yes to adding a FaxMaster alias.
For a user to received fax-related mail enter the user account you created for yourself during the Debian installation.
Four configuration parameters will be listed and you'll be prompted as to their correctness. Press Enter to accept these values. You'll then be asked if you want to run faxaddmodem to set up the software to use the modem. Press Enter to accept the default Yes response.
Enter the correct ttyS designation for the serial port your fax-modem is connected to (ttyS0 is for COM1). You'll be prompted for quite a few values. For most you can accept the default values by pressing Enter. The values you'll want to enter are:You'll then be asked to confirm the values that you entered and then the utility will query to modem to determine the fax classes that it supports.
- Country code (1 for US)
- Area code
- Phone number of fax modem
- Local identification string (this should be something like 'My Fax Server' as it is printed on the tag line of outgoing faxes)
- Long distance dialing prefix (1 in US)
- International dialing prefix (011 in US)
- Dial string rules file (accept the default)
- Tracing during normal server operation (accept the default)
- Tracing during send and receive operations (accept the default)
- Protection mode for received fax - enter 0644
- Protection mode for session logs - enter 0644
- Protection mode for ttySx - enter 0666
- Rings to wait before answer
Note: The default is 1 but setting it to 0 establishes your server as a "Send Only" fax system
- Modem speaker volume (valid values are OFF QUIET LOW MEDIUM HIGH (you may want to set it to HIGH for testing purposes as you can change it to OFF later)
- Command line arguments for getty (accept the default)
- Pathname of TSI ACL file (accept the default)
- Pathname of Caller-ID ACL file (accept the default)
- Tag line font file (accept the default)
- Tag line format string (accept the default)
- Time before purging UUCP lock (accept the default)
- Hold UUCP lockfile during data calls (accept the default)
- Hold UUCP lockfile during voice calls (accept the default)
- Percent good lines to accept (accept the default)
- Max consecutive bad lines to accept (you may want to reduce the default 5 to 3)
- Max number of pages to accept in a received fax (you may want to increase the default value of 25)
- Syslog facility name for ServerTracing messages (the default is 'daemon' but you could change it to 'local7' if you're logging to a remote syslog server)
- Set UID to 0 (accept default)
- Use priority job scheduling (accept default)
Even if your modem supports both Class 1 and Class 2 you should set it to
Class 1for compatibility with all fax machines.
You will then be asked for values specific to the modem. Just press Enter to accept the default values as they are a result of the modem query and the class you selected. You'll then be prompted to confirm these values by pressing Enter.
The non-default scheduler values will then be displayed with a confirmation prompt. The Area Code may not be correct. If so, answer No and correct any erroneous values. You may also want to increase the time value for "Timeout when converting PostScript documents" if you fax long documents but you can just press Enter to accept the default values for the rest of the values.
Answer No when asked if you want to configure another modem.
Accept the default Yes answer to run faxmodem on your newly configured modem to verify settings. You'll then be returned to the shell prompt.
If you want to manually edit the file that contains these settings do so with the command:
You have to run the faxaddmodem utility to create this file first though.
Next we'll set up HylaFAX to run automatically when you boot the system. Check the configuration file:
to make sure there's no # character at the beginning of the line containing RUN_HYLAFAX=1. Exit the editor.
One last that item is to let HylaFAX know who is allowed to send faxes. You can use a modified subnet address to let everyone on your network submit faxes to the server. Edit the hosts.hfaxd file with the command:
As an example, if your using a subnet address for your network of 192.168.10.0 enter the following line into the hosts.hfaxd file:
Likewise, if your using a subnet address of 172.16.0.0 your hosts.hfaxd file entry would be:
You can enter as "wide" of a network address or multiple narrower address entries as you'd like. If you'd like to restrict access to specific users you can enter their individual IP addresses. When done, save the file and exit the editor.
NOTE: You will see the paths /var/spool/hylafax and /var/spool/hylafax/etc specified in HylaFAX documentation and utilities. Do NOT edit the files in these directories. The files are duplicated in the /etc/hylafax directory. If you ever want to manually edit the configuration files, only edit the files in the /etc/hylafax directory.Reboot the system by pressing Ctrl-Alt-Del and you'll have yourself a fax server! Once you're back at a shell prompt, type in the command:
and you should see output similar to the following:
HylaFAX scheduler on localhost: RunningThe first line indicates that the HylaFAX daemon is running. The second line indicates that the fax-modem is initialized and ready.
Modem ttyS0 (+1.111.555.1212): Running and idle
Fax Server Clients
There are numerous free and commercial HylaFAX clients available for Linux, Windows, and Macintosh systems. The commercially available clients tend to be more sophisticated including the ability to view incoming faxes, but at a price. However, you may need only one or two of these more sophisticated clients to manage received faxes and set up the majority of network users with a less-sophisticated free client.
For Windows I found WinPrint HylaFAX at winprinthylafax.sourceforge.net to be the easiest to set up and use (and ease of use is a consideration if you're planning on implementing network faxing to a wide variety of users). It's a send-only client that sets up a printer. You then simply modify to printer port properties to point to the IP address of your fax server.
The above Web page not only provides a download link for the software but has excellent instructions with screen shots on how to set up the WinPrint HylaFAX client.
The HylaFAX Web site has extensive documentation on setting up a server, advanced configuration options, customization, available clients, and a FAQ. They also have several mailing lists that you can subscribe to as well as archives of mailing list messages. Their Web site is at:
Do NOT plan to use the system you will create using these guide pages as a "production" (real) server. It will NOT be secure!
There are many steps involved in creating a secure Internet or LAN server. While we do refer to some things you can do to make your system more secure, there are many other measures related to system security that also need to be taken into consideration and they are not covered on these pages.
These guide pages are meant as a learning tool only. The knowledge gained on these pages will help you understand the material covered in security-related publications when you are ready to consider setting up a production server.
Did you find this page helpful ?
If so, please help keep this site operating
by using our DVD or book pages.
Site, content, documents, original images Copyright © 2003-2016 Keith Parkansky All rights reserved
Duplication of any portion of this site or the material contained herein without
the express written consent of Keith Parkansky, USA is strictly prohibited.
This site is in no way affiliated with the Debian Project, the debian.org Web site, or
Software In The Public Interest, Inc. No endorsement of this site by the Debian Project
or Software In the Public Interest is expressed or implied. Debian and the Debian logo
are registered trademarks of Software In The Public Interest, Inc. Linux is a registered
trademark of Linus Torvalds. The Tux penguin graphic is the creation of Larry Ewing.
IN NO EVENT WILL KEITH PARKANSKY OR BLUEHOST INCORPORATED OR ANY OF ITS' SUBSIDIARIES BE LIABLE TO ANY PARTY (i) FOR ANY DIRECT, INDIRECT, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR INFORMATION, AND THE LIKE), OR ANY OTHER DAMAGES ARISING IN ANY WAY OUT OF THE AVAILABILITY, USE, RELIANCE ON, OR INABILITY TO USE THE INFORMATION, METHODS, HTML OR COMPUTER CODE, OR "KNOWLEDGE" PROVIDED ON OR THROUGH THIS WEBSITE, COMMONLY REFERRED TO AS THE "ABOUT DEBIAN" WEBSITE, OR ANY OF ITS' ASSOCIATED DOCUMENTS, DIAGRAMS, IMAGES, REPRODUCTIONS, COMPUTER EXECUTED CODE, OR ELECTRONICALLY STORED OR TRANSMITTED FILES OR GENERATED COMMUNICATIONS OR DATA EVEN IF KEITH PARKANSKY OR BLUEHOST INCORPORATED OR ANY OF ITS' SUBSIDIARIES SHALL HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, AND REGARDLESS OF THE FORM OF ACTION, WHETHER IN CONTRACT, TORT, OR OTHERWISE; OR (ii) FOR ANY CLAIM ATTRIBUTABLE TO ERRORS, OMISSIONS, OR OTHER INACCURACIES IN, OR DESTRUCTIVE PROPERTIES OF ANY INFORMATION, METHODS, HTML OR COMPUTER CODE, OR "KNOWLEDGE" PROVIDED ON OR THROUGH THIS WEBSITE, COMMONLY REFERRED TO AS THE "ABOUT DEBIAN" WEBSITE, OR ANY OF ITS' ASSOCIATED DOCUMENTS, DIAGRAMS, IMAGES, REPRODUCTIONS, COMPUTER EXECUTED CODE, OR ELECTRONICALLY STORED, TRANSMITTED, OR GENERATED FILES, COMMUNICATIONS, OR DATA. ALL INFORMATION, METHODS, HTML OR COMPUTER CODE IS PROVIDED STRICTLY "AS IS" WITH NO GUARANTY OF ACCURACY AND/OR COMPLETENESS. USE OF THIS SITE CONSTITUTES ACCEPTANCE OF ALL STATED TERMS AND CONDITIONS.