Hylafax as a manual fax to E-mail gateway
One of the tasks that was mentioned to me when I first started this job was to find a way to convert our received faxes to e-mail. This of course has many advantages, from saving trees to people getting their faxes quicker. Keeping with my open source theme, I decided to use a little application I found called Hylafax. Hylafax itself has the ability to receive faxes and e-mail them directly to a user. I decided to tweak this to a samba share that everyone would have access too (this way if the person that received faxes was off sick we could still check our incoming faxes). This article is a guide on How-To install a Hylafax server in VMware. This has its advantages as it doesn’t really require the full resources of a server to run, and by using a VM, you can use any modem windows can support compared to hunting down drivers for Linux. Here we go!
Hylafax… Trees rejoice!
Create a VM from the RedHat 4 Template
- To add a modem to the VM
- Click on “Edit Virtual Machine Settings” and then “Add…“
- Choose “Serial Port” and Next
- Choose “Use physical serial port on the host“
- Choose the port on the host that the modem is using (in my case COM2)
- Download the latest Hylafax build for RedHat from hylafax.org and save it on a network share
- Install CentOS4 with the following packages
- Editors
- Windows file server
- Printing Support
- log in as Root
- type yum install sharutils
- type yum install ghostscript
- Now copy the Hylafax install that was previously downloaded from the website by typing smbclient \\fileserver\share -U username
- Once connected to the correct share, copy the file by typing get hylafax-4.4.4-1rhel4.i386.rpm then disconnect by typing exit
- Now to install Hylafax by typing rpm -Uvh hylafax*.rpm
- Once Hylafax is finished installing run /usr/sbin/faxsetup to configure Hylafax and your modem
- Use most of the defaults and input the pertinent data (area code, etc.). When you get top the point where it asks what serial port your modem is on, use ttyS0 . The rest is pretty self explanatory. after a while it will get into probing the modem for a host speed. this will take up to 5 minutes, so just be patient.
- Hylafax should now be set up to receive faxes. Next we want to edit the samba config file to create a share for our faxes. Do this by typing vi /etc/samba/smb.conf . Once in vi, you will want to edit the following lines (by first pressing i)
- server string = name of server
- guest account = nobody
- security = share
- Under the “Share Definitions” create a share similar to the following
[Faxes]
path = /var/spool/hylafax/recvq
force group = uucp
force user = uucp
browseable = yes
read only = now
guset ok = yes - Save the smb.conf file by pressing ESC and then typing : x and pressing enter
- Again using vi edit the /etc/inittab file, adding the line: mo:2345:respawn:/usr/sbin/faxgetty ttyS0
- Restart the server and you can browse to the IP address of the server and to the faxes share (//ip_address/faxes)
- To be alerted when a fax is received, we need to first mount the fax share in windows (I used t:\) and download/install File Alert Monitor. FAM will display a popup whenever a file is created (AKA a fax being received). To configure FAM:
- Click on Folder -> Add and select your mapped drive letter
- Click on View -> Options and check the following
- Monitoring – creation of new files
- Run on system startup
- Minimimize when the program Starts
- Click on the “File Types” tab and click on the “Customize…” button. remove .WAV and add .TIF then click OK
- Click on OK and minimize the program to finish configuration
Using this method, as a fax is received it can be e-mailed right away without the user constantly having to check the share.
Have fun!
Awesome stuff thanks!