Table of Contents

3.1. HylaFAX Configuration
3.2. Preparatory Steps
3.3. Modem Definition
3.4. HylaFAX Configuration
3.5. Starting HylaFAX
3.6. Confirm HylaFAX status
3.7. Periodic Maintenance

3.1. HylaFAX Configuration

This chapter covers the configuration of HylaFAX for sending and receiving faxes. If your installation will be using Protus (MyFax) you can skip this section.

[Important]Upgrade installation

These steps are required for a new installation only. If this is an upgrade install, execute

# /etc/init.d/hylafax start

then skip to DFdiscover Configuration.

3.2. Preparatory Steps

This section initializes the available modems for use with HylaFAX.

3.3. Modem Definition

  1. Identify Serial Ports

    Determine which serial port(s) the fax modems will be connected to. You can configure HylaFAX to run on as many serial ports as are available and have fax modems for. A standard two-port machine uses the port names /dev/term/a and /dev/term/b. Record the names on the worksheet [HC03].

  2. Disable Port Services [HC04]

    To prevent contention between the operating system's port services and HylaFAX, disable port services on the ports selected for use with HylaFAX. This can be easily accomplished using smc. For each selected port, disable the port service by ensuring that the toggle next to Service Enable is cleared.

3.4. HylaFAX Configuration

HylaFAX is configured with the faxsetup program. This program can be found in the /opt/hylafax/bin directory.

faxsetup and faxaddmodem

  1. Execute faxsetup [HC05]

    Start faxsetup from a shell prompt:

    # /opt/hylafax/sbin/faxsetup
    

    The program leads you through the steps of initializing the HylaFAX environment. It is described completely in the HylaFAX document, Server Setup and Basic Configuration.

    [Note]Note

    Messages from faxsetup indicating that /bin/vgetty or /bin/egetty do not exist can be safely ignored.

    Except for the items in the following list, all of the defaults are correct and need only be acknowledged by pressing Enter at each prompt. The defaults that may need to be changed are:

    • FaxMaster: the value must be datafax in installations where DFdiscover and HylaFAX co-exist on the same server (typical); otherwise, datafax@machine where machine is the hostname of the DFdiscover server.

    • Country Code: in North America, enter 1; elsewhere, enter the local country code

    • Area Code: the value must be the local area code

    When faxsetup completes, it asks to configure modems. Respond y to invoke faxaddmodem automatically.

  2. Execute faxaddmodem [HC06]

    faxaddmodem is invoked automatically by the termination step of faxsetup, or it can be invoked manually with the command:

    # /opt/hylafax/sbin/faxaddmodem
    

    1. Specify device name

      faxaddmodem requires the device name of the serial port to configure and asks for this information when the program starts. The device name in the response is the same as the real device name, without the leading /dev/.

      Example 3.1. Device name for faxaddmodem

      For the system device named /dev/term/a supply the name term/a as the requested name. Similarly, /dev/tty0p0 becomes tty0p0.


    2. Accept defaults

      The program is well described in the Server Setup and Basic Configuration document.

      Again, most of the default options for the faxaddmodem program are correct.

    3. Customize area code, fax number, and sender id

      You will need to specify the area code, fax number, and sender identification string. Typically, the fax number and sender identification string are the same. Be careful not to use non-digit symbols in the sender id as some receiving machines will not like it. The recommended settings, for example, might be:

      Area code [""]? 905
      Phone number of fax modem [+1.999.555.1212]? +1.905.555.1212
      Local id string (for TSI/SIG) ["DFdiscover"]? "1 905 555 1212"
      

    4. Ensure modem is correctly cabled and powered on

      After confirming the server configuration parameters, faxaddmodem will attempt to communicate with the modem and then prompt for more configuration parameters. The modem must be cabled to the serial port and powered on at this point. The program determines an appropriate speed to converse with the modem and then interrogates it further. You can safely ignore the

      hmmm, your modem seems to be hung
      

      message.

    5. Optional configuration for dial-prefix and adaptive answer

      Finally, the modem configuration parameters are presented for confirmation. To specify a dial-prefix for outgoing calls, such as 9, and/or to disable adaptive answer, respond no to the confirmation.

      To indicate that a dial-prefix is required for outgoing calls, the following setting must be changed:

      Command for dialing [ATDT%s]? ATDT9,%s
      

      and to disable adaptive answer, the next setting must also be changed [HC07]:

      Command for setting up adaptive-answer [AT+FAA=1]? AT+FAA=0
      

      For all of the other settings, the default is fine.

    6. Repeat for next modem

      As necessary, repeat faxaddmodem for each additional modem.

After all of the modems have been defined using faxaddmodem, inittab entries must be made to spawn processes that monitor the modems.

Create inittab entry for each serial port

  1. Edit /etc/inittab

    Use your favorite text editor to edit this file. The new entries will be added at the end of the file.

  2. Add entry for each serial port

    For each modem that was defined with faxaddmodem, a record must be added. The format of each record is:

    fx0:234:respawn:/opt/hylafax/lib/fax/faxgetty tty0p0
    

    The first column can contain any unique identifier string that is at most three characters in length and it must be different for each modem, e.g. fx0, fx1, fx2, etc. The argument to the last field of the record must be the same name of the device that was used when faxaddmodem was run.

    Example 3.2. inittab entry for serial port /dev/term/a

    fx1:234:respawn:/opt/hylafax/lib/fax/faxgetty term/a
    


  3. Save file

    Save the changes made to /etc/inittab and exit the editor [HC08].

  4. Restart the system init process

    This process always has the process id of 1 and it is most easily restarted with the command:

    # kill -1 1
    

The configuration of HylaFAX is complete.

3.5. Starting HylaFAX

The DFdiscover software installation includes a script that gracefully starts HylaFAX after the computer is booted, and conversely, gracefully halts HylaFAX before the computer is halted.

The script can be found in /opt/dfdiscover/init.d/hylafax. So that the script is available to the system when it boots or halts, it must be installed in a known system location.

  1. To install the HylaFAX startup script; [HC09]

    # cp /opt/dfdiscover/init.d/hylafax /etc/init.d/hylafax
    # ln -s /etc/init.d/hylafax /etc/rc3.d/S99hylafax
    # ln -s /etc/init.d/hylafax /etc/rc1.d/K20hylafax
    

  2. With the script in place, start HylaFAX [HC10]

    # /etc/init.d/hylafax stop
    # /etc/init.d/hylafax start
    

3.6. Confirm HylaFAX status

At this point, HylaFAX should be running and its status can be examined with the faxstat command. Type:

# /opt/hylafax/bin/faxstat -a

The output from the command will show the HylaFAX scheduler executing followed by one record for each defined modem [HC11].

Example 3.3. Output from faxstat for a system with a single modem

# /opt/hylafax/bin/faxstat -a
HylaFAX scheduler on purgatory: Running
Modem term/a (+1.905.555.1212): Running and idle

3.7. Periodic Maintenance

HylaFAX generates a significant amount of log information that can be useful debugging information should the need arise. The log information also records per fax details such as sender identification, duration of call, number of pages, and quality of transmission. This log information needs to be managed intelligently. HylaFAX provides two periodic maintenance scripts, faxqclean and faxcron that serve this purpose.

faxqclean should be configured to run once per day [HC12] while faxcron should run once per week [HC13]. The simplest way to achieve this is with the UNIX cron facility. The cron entries, for super-user, should look like:

0 1 * * * /opt/hylafax/sbin/faxqclean
0 2 * * 1 sh /opt/hylafax/sbin/faxcron | mail root

As super-user, add the cron entries.

For additional information, review General Tweaking and Customization Hints.