Disclosure: This is not an official guide by any means. This is just what I use to build Hyalfax/AvantFax boxes for the company that I work for. It was initially put together by a co-worker and myself, and I edit it as needed. This is how it works for us, I hope it works for you
What is Hylafax/AvantFax? - Hylafax is an application that can be used to do all sorts of things with faxing on Linux. AvantFax is another application that sits "on top" of Hylafax and adds a website for administering faxes.
We currently use it for the following: 1) Receiving faxes that contain orders for our company and then emailing those faxes to a specific inbox or having users log into the AvantFax page for their server and manage the faxes as needed there. 2) Installing a Hylafax client to send faxes from user's desktops using the modems on the Hylafax server. I'm sure other people can use it for other means, but this is specifically what we use it for.
Why 10.04 instead of 12.04? - Because I haven't verified everything on 12.04 yet, but it's coming
Introduction: (Straight from the website)
HylaFAX is an enterprise-class system for sending and receiving facsimiles as well as for sending alpha-numeric pages. The software is designed around a client-server architecture. Fax modems may reside on a single machine on a network and clients can submit an outbound job from any other machine on the network. Client software is designed to be lightweight and easy to port. HylaFAX is designed to be very robust and reliable. The fax server is designed to guard against unexpected failures in the software, in the configuration, in the hardware and in general use. HylaFAX can support multiple modems and a heavy traffic load. Not to mention, it's also Open Source, so if you're going to install a modem or create a new Hylafax server, you'll need to be prepared for some Linux command line use.
Administering HylaFAX with AvantFAX:
AvantFAX is another piece of software that is Open Source and will run on the same server as the HylaFAX server. It helps by creating a web site that showcases the faxing that's done through this server and can help if anything breaks or if reports need to be generated.
Setting Up a New Server
Assumptions: This was tested with the Ubuntu 10.04 and the Ubuntu build of the Hylafax package. The Ubuntu server was already setup with only SSH, updated, and would now be ready to go.
Make sure static IP is set to something:
1) Install HylaFAX:
iface eth0 inet static
dns-nameservers <IPs of local DNS servers>
dns-search <domain name>
dns-domain <domain name>
# sudo apt-get install hylafax-server hylafax-client
a) During the installs that happen at this stage, there will be a couple of pop-ups asking for information. Please use the following in this order for answers:
Which type of setup: Internet with smarthost
System mail name: <FQDN of your server>
SMTP relay host: <your relay server>
a) Configure the software:
a) Choose all defaults until it asks you if you want to setup a modem. Once you get to the point where setup is asking you if you want to run faxaddmodem to configure a modem, choose NO. You will add modems later and possibly once you're on site.
2) Install AvantFax:
Either download the software from AvantFax's website (http://www.avantfax.com/) or wherever you store it after the download. We have it stored on a network share, so it's SSH'd into the /home/user directory.
a) Move the software to where you'd like it to reside and untar it
# sudo mv /home/user/avantfax-3.3.3.tgz /opt
# sudo cd /opt
# sudo tar -xvzf avantfax-3.3.3.tgz
b) Move AvantFAX folder to /var/www
# sudo mv avantfax-<version number>/ /var/www
c) Run the install script (only ever run this script ONE TIME!!)
# sudo cd /var/www
# sudo ./debian-install.sh
1) Set MySQL password to whatever you want, but remember it for the next step
d) Create AvantFAX DB
**NOTICE** - I'm currently setting up the database with the default avantfax user's password. Please change if you don't want people to know the database password.
# mysql -uroot -p < create_user.sql
# mysql -uavantfax -pd58fe49 avantfax < create_tables.sql
e) Change AvantFax log location
# sudo cd /etc/apache2/sites-available
# pico default
# ServerName avantfax
CustomLog /var/log/apache2/avantfax-access_log common
f) Restart Apache
# sudo apache2ctl restart
g) Open browser to http://<IP of your HylaFAX server>/avantfax/admin to verify AvantFax works
1) Username: admin Password: password
2) Change password to be whatever you desire
3) Change the following file to have 127.0.0.1 in it so faxstat works correctly and modem status shows up correctly in AvantFAX:
4) To ensure that AvantFax can show faxes in the Inbox and send emails:
# sudo pico /etc/hylafax/hosts.hfaxd
5) Restart Hylafax
# sudo mv /var/spool/hylafax/bin/faxrcvd faxrcvd_hylafax
# sudo mv /var/spool/hylafax/bin/faxrcvd.php faxrcvd
If you're going to use a system with multiple modems attached to it, know the following: If they're external USB modems, every system reboot they have a possibility to change their location (ttyACM0 could become ttyACM1), so in order to get around this, I setup udev (http://linux.die.net/man/8/udev) rules to make them
# sudo /etc/init.d/hylafax restart
stay static. I couldn't use the serial numbers (even though I've found modems with unique serial numbers, udevadm can't see them). Therefore, I would create a new "rules" file and add rules like the following:
# Line X - Modem01 This is a comment line.
SUBSYSTEMS=="usb", KERNELS=="3-4.3:1.0", SYMLINK+="Modem01"
Project Web Pages:
Refreshes "faxstat" every 2 seconds to give a snapshot of what modems have been setup for Hylafax and what their current status is.
Issue - Modem says "Waiting for modem to come free" when you run faxstat and faxes aren't coming in
Fix - Restart the Hylafax service by running:
How to reset a modem if it gets stuck:
# sudo /etc/init.d/hylafax restart
Atdt<number to call>
Congratulations, you should now have a working HylaFAX w/ AvantFAX box ready for use! After this, we do some extra setups for administrating these boxes (we currently have ~10 HylaFAX servers). If there is a demand to have me write up any of the following, please let me know! Also, if you have any critiques, questions, or concerns about this guide, please don't hesitate to PM me!
1) Scripted Failed Faxes Report - My co-worker created a way to use Mercurial to send out and update a script that's run daily through Crontab to email us which faxes failed, the reasons why, and how many failed per modem.
2) Install SNMP to use Dell OMSA and Nagios to monitor the server hardware