Hylafax Fax Server Installation & Configuration
March 27, 2012 1 Comment
It’s 2012 and many people still rely on faxes and faxing. I recently had need for a system that would allow faxes to be broadcast from users’ desktops. There are several solutions on the market, including web based internet faxing. But, I was shocked to see the pricing especially for the in-house fax servers. Fortunately, there is a free alternative called Hylafax that is very good.
Hylafax is a free and open source fax server that runs on Linux. From the fairly extensive documentation, setting up a Hylafax server may seem like a daunting task, but it is quite straightforward.
In this example, I’m using an Ubuntu Linux server, but most of the major Linux distributions include Hylafax in their repositories, so you can use any flavor of Linux that you choose. Naturally, you’ll need a modem so be sure to check the Hylafax site for supported models, although most fax modems are fully supported. Do make sure that it is a fax modem, regular data modems might not work.
After the modem is connected and working, installing Hylafax on Ubuntu is typically Ubuntu/Debian easy.
sudo apt-get install hylafax-server
Once the installation is complete, we must configure Hylafax to run when the server is started. To do this run the setup wizard:
faxsetup
The resulting default options are usually correct. Here are the prompts with the typical answers.
HylaFAX configuration parameters are:
[1] Init script starts faxq: yes
[2] Init script starts hfaxd yes
[3] Start paging protocol: no
Are these ok [yes]? Yes
You have a HylaFAX scheduler process running. faxq will be
restarted shortly, as soon as some other work has been completed.
Can I terminate this faxq process (7523) [yes]? yes
Should I restart the HylaFAX server processes [yes]? yes
When this is complete, it is then necessary to confgiure Hylafax to use the connected modem(s). This is done with the faxaddmodem command.
sudo faxaddmodem
The first item is critical, which modem to use. Make sure that you point it to your modem device.
Serial port that modem is connected to [ttyS0]? ttyUSB2
After that most default settings are correct. But, be sure to enter your fax number and TSI details.
Country code [1]?
Area code [415]? 999
Phone number of fax modem [+1.999.555.1212]? 999-888-0000
Local identification string (for TSI/CIG) ["NothingSetup"]? "My Company"
Long distance dialing prefix [1]?
International dialing prefix [011]?
Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]?
Tracing during normal server operation [1]?
Tracing during send and receive sessions [11]?
Protection mode for received facsimile [0600]?
Protection mode for session logs [0600]?
Protection mode for ttyUSB1 [0600]?
Rings to wait before answering [1]?
Modem speaker volume [off]?
Command line arguments to getty program ["-h %l dx_%s"]?
Pathname of TSI access control list file (relative to /var/spool/hylafax) [""]?
Pathname of Caller-ID access control list file (relative to /var/spool/hylafax) [""]?
Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]?
Tag line format string [“From %%l|%c|Page %%P of %%T"]?
Time before purging a stale UUCP lock file (secs) [30]?
Hold UUCP lockfile during inbound data calls [Yes]?
Hold UUCP lockfile during inbound voice calls [Yes]?
Percent good lines to accept during copy quality checking [95]?
Max consecutive bad lines to accept during copy quality checking [5]?
Max number of pages to accept in a received facsimile [25]?
Syslog facility name for ServerTracing messages [daemon]?
Set UID to 0 to manipulate CLOCAL [""]?
Use available priority job scheduling mechanism [""]?
These settings are stored and editable in the following file:
/var/spool/hylafax/etc/config.
Next up is adding users who can use Hylafax. To do this you use this command:
sudo faxadduser –p
However, I planned to allow all the network users to send faxes and didn’t wish to add them all to hylafax. Additionally, this server was already connected to Active Directory for user authentication so I did not need to create accounts on the Linux server. (See my previous post on how to connect Linux to Active Directory.) Instead I chose to open access to the Hylafax server for my entire private network. To do this, I edited this file as follows;
/var/spool/hylafax/etc/hosts.hfaxd
localhost:21::
10\.123\.45\.[0-9{1,3}
This convoluted bit of text allows any host on the network 10.123.45.0/24 access to Hylafax. It is written in this obscure way because the file is interpreted as a regular expression and simply typing out 10.123.45.* would produce a few additional unexpected and possibly undesired permitted networks.
At this point, users with a Hylafax client on their desktops (You can find a long list of available clients, free and commercial for all platforms, on the Hylafax site.) can use the freshly installed Hylafax server for desktop faxing.
I’ll cover additional details like dialing rules and inbound fax routing in future posts. In the mean time, happy faxing.