Hylafax game

Bellow is my short summary of how I was configuring a Hyalafax server on Ubuntu 10.04. The end result which I was striving to achieve was a fax server that could act both as a fax2email and an email2fax gateway.

Installing and configuring Hylafax server with a proven hardware is easy and surely not a rocket since at all. My advice, try to avoid as much as you can any kind of softmodem (winmodem) equipment and stick to hardware based one, that would save you a huge amount of time and your brain nerve cells as well. I’ve learned that hardway myself since I had no option but to use several of them myself (Intel536ep, Intel537, Lucent, Conexant HSF) and in my case only intel536ep delivered an acceptable level of stability. But in general all softmodems suck!

Back to our story. As I’ve already mention, the installation process is really easy in itself and reminds me the times when I had to install a Windows application: next, next, next, … , finish. Just double check that your modem has been identified and is active by using minicom or cu tools. Try to enter several AT commands, .e.g. ATZ, AT+FCLASS=1, etc. Here is a list of other AT commands you could find useful.

To setup a fax to email gateway is also a no brainer and is just a matter of adding a few lines into /etc/hylafax/FaxDispatch file:

FILETYPE="tiff pdf"

With these settings Hylafax would send fax in tiff and pdf formats to email@address1 and if you want the fax to be emailed to more than one address then just add another SENDTO1, SENDTO2, SENDTO3, etc. line/lines. Sometimes, tiff and pdf are not enough and you’d like to have a jpeg version of a fax but Hylafax doesn’t support that out-of-box. So I had to come up with a simple patch that would convert an incoming fax into jpeg and if it’s a multipage then a zip archive will be created with all pages inside. This patch was created against Hylafax server version 6.0.3 and could be download from here. After you apply this pach update FILETYPE and add jpeg or jpg as another option. Just a reminder, before applying the patch make a backup copy of your original common-functions file.

Setting an email to fax gateway is not harder and I will show how easy to do that with Postfix.

fax    unix    -    n    n    -    1    pipe    flags=    user=faxmaster    argv=/usr/bin/faxmail -d -n -N -T ${user}

In the end, I’d like to mention a very uselfull Hylafax’s option called jobcontrol that gives you the ability to customise outgoing jobs, i.e. have a different LocalIdentifier depending on a recipient or a sender. Just follow this link to get a better idea and take a look at different examples.

Happy faxing.

Posted on March 17, 2011 at 10:54 pm by sergeyt · Permalink
In: Linux

Leave a Reply