"Linux Gazette...making Linux just a little more fun!"


Hylafax

By Dani Pardo


Our company network is based on some sparcs and linux servers and windows (3.11 and 95) clients, wich telnet to the server to use a Cobol-written accounting program. After passing from nfs to samba (imagine the user's fun when they first discovered winpopup), we decided to try some fax software. We had some alternatives: comercial (and really expensive) Un*x software, the NT alternative, and the free software solution.

NT was an unfriendly and unflexible solution, based on licenses per user, and we didn't want to spend thousands of dollars buying an unix fax server. Having had the good samba experience, we decided to give hylafax a try.

HylaFax (originally flexfax) is made by Silicon Graphics, and distributed with source code, availiable at http://www.vix.com/hylafax/. Latest version is 4.0pl1. Get also the tiff library. If you get the source, you must first compile and install the tiff library (in order to convert tiff files to .g3 fax format). You must also have Ghostscript up and running to convert from Postscript to g3. As experience: use the latest ghostscript you can get (unless you would like to see your customer receiving ghostscript error messages by fax).

After having the tiff library installed, hylfax compiles at first under an stardard linux distribution, placing binaries under /usr/local, and /var/spool/fax for the jobs.

Once installed, configure the system by running /usr/local/sbin/faxsetup. It will add the fax user, modify /etc/services and /etc/inetd.conf (hylafax listens to ports 4559 and 444). After some other confguration, faxsetup will run faxaddmodem, in order to configure wich modem(s) to use. Faxaddmodem will talk to the modems you've specified, getting its parameters, and let you configure other stuff.

Hylafax consists in two daemons: hfaxd (the server), and hfaxq (the priorityzed Round-Robin scheduler). You should run faxmodem to tell the scheduler wich modem(s) it can use. If you've also planed to receive calls, you'll have to set up faxgetty, that will place incoming faximiles into /var/spool/fax/incoming, respecting also data calls (pasing the control to getty/mgetty). You should also add these daemons in /etc/rc.d. Now you can check the server works by telneting yourself at port 4559.

Some useful programs you will use are sendfax (files), faxstat (to check the queue), and faxrm to remove jobs. Sendfax calls faxq, sendpage, etc.. It also invoques ghostscript for the image format translation, so you'll normally send postscript or ascii text. If you want to send other formats, check out /usr/local/lib/fax/typerules. Other interesting configuration files reside at /var/spool/fax/etc: If you run in trouble with your modem, you'll probably want to check them.

And to finish with the server side, it's not a bad idea to modify crontab to invoque faxqclean, in order to remove sent faxes.

The Client Side

Once you've hylafax up and running, it's time to configure the clients: There's MacFlex for Macintosh users, and WinFlex for Windows users. With Winflex (and MacFlex too), you'll install a generic postscript printer (I usually use a Apple Laserwriter Pro600 window's driver). So, when something is sent to that printer, a window appears, asking for the phone number. You can also check the queue, remove jobs, etc. Once the fax is sent, the user will receive an e-mail confirming the job has been done with some other useful information. HylaFax creators claim that "you'll never loose a fax", and I must say that this aspect has been taken with a great effort.

WinFlex, although a good solution, is not perfect (the interface with the printer driver is a bit poor), and doesn't use all hylafax features yet (any volunteer?).

Another feature yet to be perfectioned, this time a server feature, is the automatic cover page generation: I've really had pains to create the cover page, much postscript knowledge needed. In our company, we finally wrote the cover page as a normal document with our word processor, and copy it in a samba share.

Let's Have Fun

The real party began when I was told about the accounting department special need. They needed to send the facturation automatically by fax. That facturation was generated by the cobol program as an ascii file, up to 20 pages. But ALL pages had to inlcude the company logo at top, and some text at the left side. That seemed to be a harder issue than the cover page one, but after some scripting and some C, and thanks giving to hylafax flexibility, I could write a printer filter that:

Now, I don't even want to think how I'd solve this problem with a Windows server.

Conclusions

HylaFax is a versatile, powerful and flexible fax software, although missing some features. It's highly configurable, provides a good amount of debugging information, its secure, and it's free.

There's also a mailing list, where you can get patches and solve some problems. Once again, free software has proven me its strength.


Copyright © 1998, Dani Pardo
Published in Issue 25 of Linux Gazette, February 1998


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next