MailMeAnywhere HylaFAX Fax Server







Mohsen Banan
public@mohsen.banan.1.byname.net



Version 1.0
May 5, 2003


Contents


List of Figures


List of Tables

1 Fax Capability

Fax capability is provided as a generalized module that can be customized and integated in various ways.

1.1 MMA Hylafax Resource Center

Hylafax (http://www.hylafax.org) is a mature and feature rich open-source software package for Linux.

We have put together a complete collection or related software available at http://www.mailmeanywhere.org/

1.2 Inbound Faxes

Based on the incoming fax phone line, the fax becomes an email attachment and an email is sent to the fax distributor operator. Which then forwards or resends the inbound fax to its proper destination.

1.3 Outbound Faxes

A number of different interfaces for sending out faxes are supported.

2 Fax Server

The hylafax software is installed, configured and managed using an mma interface.

2.1 mmaFax Interface

A complete mmaFax module has been put together. See mmaFaxRoadmap.sh for an overview.

2.2 Current Modem Setting

Currently, the fax server is run on Linux machine named Janeway. The modem that are currently used is "Hayes Century 2 Rack System" modem. It can hold up to 16 serial modem, but for now it only has 8 modems installed on that rack.

2.3 KNOWN PROBLEM WITH MODEM

- Use Class 2 modem when setting up the modem
  (i.e. when running the faxaddmodem)
- To debug the modem on Linux, use minicom
  Common command line:
    at&f - factory setting
    at&v - current setting
    at&w - write new setting
- If there is error occur when receiving fax with
  message " Missing EOL after 5 seconds", edit the 
  config.ttySx and chnage the following value:
    Class2RecvDataTrigger: "\022"

  This is caused by a flow control configuration
  problem.  This happen if the trigger is wrong.

3 Fax Clients

3.1 Outbound Fax Clients Interface - UNIX

Hylafax comes with a number of GUI and script based interfaces. sendfax is the primary command. These client programs are a standard part of the HylaFax distribution.

3.2 Windows HylaFax Client (WHFC)

The WHFC package is available at http://www.mailmeanywhere.org/

It needs to be configured with the fax server information. When installing this software, choose custom installation for English version otherwise the default installation would be in German.

Make sure that the Sender information is filled in the User preferences menu.

In order to use the fax client, the user need to be added to hylafax's permission file. Use the following command to add the user: mmaFaxAdmin -p username=lisa -i faxUserAdd.

As of version 1.0.9 (the latest as of May 1, 2003) you can enable passive ftp connections when setting the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Whfc\UsePasv to 1. If you want active connection (default) set this key to 0. This might be useful in the firewall environment.

In order to be able to view the incoming fax, you need to configure and install several things:

  1. Install tiff viewer (get it from http://www.mis2.udel.edu/~terence/tiffview/). Install it in C:/ProgramFiles\TiffViewer.

  2. Alternatively, Kodak Imaging for Windows is included with the Windows 98 and Windows 2000 operating systems. Use this instead of tiffview.

  3. To view the incoming fax, first you have to export the directory /var/spool/fax/recvq on your HylaFAX host e.g. via samba. If you do it with samba you can put the following entry in smb.conf :

    [recvq]    
        comment = Fax Receive Queues    
        browsable = yes    
        path = /var/spool/fax/recvq    
        public = yes    
        writable = no
    

  4. Edit your /var/spool/hylafax/etc/config.ttySx and change the following:
    RecvFileMode:           0644
    LogFileMode:            0644
    DeviceMode:             0666
    

  5. enter "c:\ProgramFiles\TiffViewer\TIFFVIEW\\hylafaxhost\recvq\%s" or C:\Program Files\Windows NT\Accessories\ImageVue\kodakimg \\hylafaxhost\recvq\%s on the systemsettings dialog in the field "Program and arguments for viewing received faxes" (replace hylafax host with the correct hostname of your HylaFAX server).

3.2.1 Outbound Email To Fax Gateway

An email to fax gateway which takes email with attachments addresses to 425-644-2886@fax.someDomain.com will also be setup.


4 Recommended Configuration

The comprehensive configuration that we recommend is shown in Figure 1 and Figure 2.

4.1 Fax Modems

External modems work a lot better than internal modems for fax server.

With external modems, one can visually view the current status of each modem, one can add and remove modems of various types, one can physically turn on and off individual modems, ...

4.2 Ultra High Speed PCI I/O Card

4.2.1 PCI-800H-25 Specificaion

Manufacturer: VScom

Description:

- 8-port Serial, 16950 UARTs (128-byte FIFO), RS-232, 
  PCI-bus 5-volt, plug & play card.
- Settable to COM1-COM99.
- Supports fast data transfer rates (up to 921,600 bps).
- Provides 8 DB25 (25-pin male) serial connectors 
  via an included octopus cable that plugs on to 
  the back of the card.
- Uses only 1 IRQ and can share an interrupt with other 
  plug & play devices in your system.
- Designed for use with Windows 95, 98, ME, 2000, XP, 
  NT 4.0, DOS, Linux kernel 2.0.xx and later & OS/2. 
  Drivers/instructions for these operating systems are included.

4.2.2 Installation

 1) At present, this board was installed on Debian Linux 
    with kernel version 2.4.18
 2) Install devfsd: Daemon for the device filesystem
    (new type of device interface to Linux, starting
    with kernel 2.4).
 3) The board should have been recognize at boot time
    Run: 
            setserial -g /dev/ttyS*

    you'll see some info about how that device driver 
    is configured for your ports. Note that where it says 
    "UART: unknown" it probably means that no uart exists. 
    In other words you probably have no such serial port and 
    the other info shown about the port is meaningless and 
    should be ignored. If you really do have such a serial port, 
    setserial doesn't recognize it and that needs to be fixed.

    The possible outcome of setserial command is as follow:
   
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS10, UART: 16950/954, Port: 0xe410, IRQ: 10
/dev/ttyS11, UART: 16950/954, Port: 0xe418, IRQ: 10
/dev/ttyS4, UART: 16950/954, Port: 0xdc00, IRQ: 10
/dev/ttyS5, UART: 16950/954, Port: 0xdc08, IRQ: 10
/dev/ttyS6, UART: 16950/954, Port: 0xdc10, IRQ: 10
/dev/ttyS7, UART: 16950/954, Port: 0xdc18, IRQ: 10
/dev/ttyS8, UART: 16950/954, Port: 0xe400, IRQ: 10
/dev/ttyS9, UART: 16950/954, Port: 0xe408, IRQ: 10

4.3 Intranet Features

Within the Intranet, the email-to-fax gateway is disabled.

Within the Intranet, the client server feature is enabled. Because we are in a secure environment, client access restrictions can be minimal.

Figure 1: Intranet Fax Server Configuration
\includegraphics[width=5.5in]{figures/hylafaxPict_intra}

4.3.1 Incoming Fax Through Email Distribution

The incoming fax is sent to dedicated email address (i.e. fax@somedomain.com) and from there it will be distributed to the correct recipient. In order to do this, the fax server need to create the fax dispatch:

- Create a file /var/spool/hylafax/etc/FaxDispatch 
  This file will contain the following line:

FILETYPE=pdf
SENDTO=fax@somedomain.com

  The FILETYPE can be either ps, pdf, or tiff

- If the FILETYPE is pdf, customization of 
  /var/spool/hylafax/bin/faxrcvd is needed.

  - Download fax2pdf source file from:
       http://sourceforge.net/projects/fax2pdf or
       from local (/opt/public/mmaSrc/fax2pdf)
    gunzip, tar it, and run make.  Copy fax2pdf application
    to TIFFBIN (usually it's /usr/local/bin).
    If in doubt, you can check the variable of TIFFBIN
    in /var/spool/hylafax/etc/setup.cache.
  - Download mimencode from:
       ftp://www.fax2send.com/ac000609/misc/mimencode.tgz or
       from local (/opt/public/mmaSrc/fax2pdf)
    gunzip and then tar it.  Copy mimencode application to
    /usr/bin (you can copy it anywhere you want as long
    as it's in your path)
  - Edit the /var/spool/hylafax/bin/faxrcvd as the following:
    Add line:
       FAX2PDF=$TIFFBIN/fax2pdf

    Edit the if clause for FILETYPE=pdf to be like:

         elif [ "$FILETYPE" = "pdf" ]; then
             echo "Content-Type: application/pdf; name=\"c$COMMID.pdf\""
             echo "Content-Description: FAX document"
             echo "Content-Transfer-Encoding: base64"
             echo "Content-Disposition: attachment; filename=\"c$COMMID.pdf\""
             echo ""
             $FAX2PDF $FILE $FILE.pdf 2>/dev/null
             $MIMENCODE $FILE.pdf 2>/dev/null
             $RM -f $FILE.pdf 2>/dev/null
         else #  default as Postscript
             .....
             .....

4.4 DMZ Features

On the DMZ side, the client server feature is disabled. This makes the DMZ server more secure.

On the DMZ side, the email-to-fax gateway is enabled.

Figure 2: Public Fax Server Configuration
\includegraphics[width=5.5in]{figures/hylafaxPict_pub}

4.5 PBX and Modem Configuration

Generally speaking, external modems are preferred.

In order to provide for continous incoming fax processing, enable immediate ringing on the primary server (Intranet) and delayed ringing on the secondary server (DMZ).

Program all incoming fax modems uniformly for first ring pick-up.

Allow for incoming fax modems to also be used for outgoing but out them at lower priority than dedicated outgoing faxes.