Home > Linux, VMware > Hylafax as a manual fax to E-mail gateway

Hylafax as a manual fax to E-mail gateway

Hylafax LogoOne 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

  1. To add a modem to the VM
    1. Click on “Edit Virtual Machine Settings” and then “Add…
    2. Choose “Serial Port” and Next
    3. Choose “Use physical serial port on the host
    4. Choose the port on the host that the modem is using (in my case COM2)
  2. Download the latest Hylafax build for RedHat from hylafax.org and save it on a network share
  3. Install CentOS4 with the following packages
    1. Editors
    2. Windows file server
    3. Printing Support
  4. log in as Root
  5. type yum install sharutils
  6. type yum install ghostscript
  7. Now copy the Hylafax install that was previously downloaded from the website by typing smbclient \\fileserver\share -U username
  8. Once connected to the correct share, copy the file by typing get hylafax-4.4.4-1rhel4.i386.rpm then disconnect by typing exit
  9. Now to install Hylafax by typing rpm -Uvh hylafax*.rpm
  10. Once Hylafax is finished installing run /usr/sbin/faxsetup to configure Hylafax and your modem
  11. 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.
  12. 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)
    1. server string = name of server
    2. guest account = nobody
    3. security = share
  13. Under the “Share Definitions” create a share similar to the following
    path = /var/spool/hylafax/recvq
    force group = uucp
    force user = uucp
    browseable = yes
    read only = now
    guset ok = yes
  14. Save the smb.conf file by pressing ESC and then typing : x and pressing enter
  15. Again using vi edit the /etc/inittab file, adding the line: mo:2345:respawn:/usr/sbin/faxgetty ttyS0
  16. Restart the server and you can browse to the IP address of the server and to the faxes share (//ip_address/faxes)
  17. 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:
    1. Click on Folder -> Add and select your mapped drive letter
    2. Click on View -> Options and check the following
      1. Monitoring – creation of new files
      2. Run on system startup
      3. Minimimize when the program Starts
    3. Click on the “File Types” tab and click on the “Customize…” button. remove .WAV and add .TIF then click OK
  18. 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!

  1. reg
    April 17, 2009 at 2:47 am

    Awesome stuff thanks!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: