Translation(s): English - Italiano

(!) ?Discussion

HylaFAX, an advanced open source fax server.

Based on and


apt-get install hylafax-server

Xen / Virtualisation

Warning - It is possible that Hylafax may have problems running in a virtual environment. Fax sending and receiving is very time critical. There has been numerous cases where a setup is fine but the virtual environment causes failures that are hard to diagnose.

Initial Configuration

run the faxsetup utility to begin configuring hylafax.


        HylaFAX configuration parameters are:

        [1] Init script starts faxq:            yes
        [2] Init script starts hfaxd            yes
        [3] Start old protocol:                 no
        [4] Start paging protocol:              no
Are these ok [yes]? 

Modem support functions written to /var/spool/hylafax/etc/setup.modem.
Configuration parameters written to /var/spool/hylafax/etc/setup.cache.

Restarting HylaFAX server processes.

You have a HylaFAX scheduler process running.  faxq will be
restarted shortly, as soon as some other work has been completed.
Can I terminate this faxq process (24932) [yes]? 

        * Country code (1 for US)
        * Area code (fill in with your area code)
        * Phone number of fax modem (in format, for the US)
        * Local identification string (this should be something similar 'My Fax Server' as it is printed on the tag line of outgoing faxes)
        * Long distance dialing prefix (1 in US)
        * International dialing prefix (011 in US)
        * Dial string rules file (accept the default)
        * Tracing during normal server operation (accept the default)
        * Tracing during send and receive operations (accept the default)

        * Protection mode for received fax - enter 0644 if you want to share files directly, accept the default 0600 otherwise
        * Protection mode for session logs - enter 0644 if you want to share files directly, accept the default 0600 otherwise
        * Protection mode for ttySx - enter 0666 if sharing the modem, 0600 if you are using this modem only with hylafax
        * Rings to wait before answering - The default is 1 but setting it to 0 establishes your server as a "Send Only" fax system
        * Modem speaker volume (valid values are OFF QUIET LOW MEDIUM HIGH) (you may want to set it to HIGH for testing purposes as you can change it to OFF later)
        * Command line arguments to getty program (accept the default)
        * Pathname of TSI access control list file (accept the default)
        * Pathname of Caller-ID access control list file (accept the default)
        * Tag line font file (accept the default)
        * Tag line format string (accept the default)
        * Time before purging a stale UUCP lock file (accept the default)
        * Hold UUCP lockfile during inbound data calls (accept the default)
        * Hold UUCP lockfile during inbound voice calls (accept the default)
        * Percent good lines to accept during copy quality checking (accept the default)
        * Max consecutive bad lines to accept during copy quality checking (you may want to reduce the default 5 to 3)
        * Max number of pages to accept in a received fax (you may want to increase the default value of 25)
        * Syslog facility name for ServerTracing messages (the default is 'daemon' but you could change it to 'local7' if you're logging to a remote syslog server, and want to separate fax logging from other log messages)
        * Set UID to 0 to manipulate CLOCAL (accept default)
        * Use available priority job scheduling mechanism (accept default)

Assuming the above steps went well, running /etc/init.d/hylafax restart should result in hylafax listening to the modem for incoming faxes, and allowing local command line fax sending.

Sending a fax from the command line

To test our newly installed fax server, we're going to send a text file to a remote fax machine.

To send a fax from the command line, run the following command:

sendfax -n -d <PHONENO> /etc/

where <PHONENO> is the phone number of a fax machine you can receive a fax at (that is not on the same phone line as your hylafax server).

assuming all went well, you should now have a fax waiting on you at the phone number you entered.

Configuring Network Faxing

Now we're going to let HylaFAX know who on the local network is allowed to send faxes. If you are not allowing local network users to use this fax server, you can skip this section.

Access Controls

To allow users on the local network access to the fax server, you can use a subnet wide rule to let everyone use it, or select individual addresses.



After editing this file, it is necessary to re-start the hylafax server by issuing the command /etc/init.d/hylafax restart

Creating Users

For each user on the network you want to print to your fax server, you need a user on your system

adduser dept1

cat /etc/group

faxadduser -p password -u 1001 username

Configuring Fax to Email

To route incoming faxes to a destination other than sitting in the recvq, we're going to create a FaxDispatch script in /etc/hylafax.


## FaxDispatch file - routes all inbound faxes to as TIFF files
## Consult the faxrcvd(8C) man page for more information

Please note that using filetypes other than tiff are allowed, but tiff is the native language spoken by the fax system, and therefore requires the least ammount of work to handle, on the fax server.

Configuring Email to Fax with Exim

The email becomes the first page and all attachments will be sent as additional pages, however handling of the attachments is not perfect, in particular jpeg. For best results use PDFs as they seem to be processed reliably and are already paper sized.

Fax recipients must have addresses in this format:


   driver = manualroute
   transport = exifax
   route_list ="*.fax"


  driver = pipe
  user = faxmaster
  command ="/usr/bin/faxmail -n ${local_part}@${extract{1}{.}{$domain}}"

Automatically Printing Incoming Faxes

## and/or by device
case "$DEVICE" in
ttyS14)   /usr/bin/tiff2ps -w 8.5 -h 11 -a $FILE |lpr -P kyocera; mv $FULLPATH /var/spool/hylafax/recvq/dept1/;;    # all faxes received on ttyS14
ttyS15)   /usr/bin/tiff2ps -w 8.5 -h 11 -a $FILE |lpr -P kyocera; mv $FULLPATH /var/spool/hylafax/recvq/dept2/;;    # all faxes received on ttyS15

Please note that specifying the size of a page is recommended to make sure 11x14 pages are printed properly.

Viewing faxes through internet browser

apt-get update
apt-get install apache2

cd /var/www
ln -s /var/spool/hylafax/recvq fax

Fax Sending Clients

In general the list of all the software is here, but you can just go to the following URL.


You can use Gfax or Kde Print Fax. You install it Gfax by:

apt-get update
apt-get install gfax

Then Go to Application then Office then Gfax.

Now i can do fax from OpenOffice, TextEditor, etc..

1. Install GFax from apt-get install gfax
2. Configure GFax with your Fax Server (HylaFAX).. I hope you know how to do it..
   Ok, you can test your GFax configuration by test send a fax with Text Editor (Applications -
3. To make it work with openoffice, run /usr/lib/openoffice/program/spadmin  (with root access), you
 do sudo -i, or whatever.
4. You add fax / pdf converter from spadmin GUI, fill the command with: gfax (TMP)
5. That's it... you save the configuration
6. Try fax an openoffice document

1st time i try fax with Fax Printer, it hang..
then i tried fax with PDF Converter and set the PDF Folder, then after fax, i close the GFax and not


Known Working Hardware

Serial Modems

  1. US Robotics 56K External Fax Modem; 5686E (Does not come with cable)
  2. USRobotics Courier V.Everything External Fax Modem
  3. Amigo AME-CA95, External V.92 DATA/FAX/TAM Modem -(

Multiport Serial Adapters

  1. 4 Multi Port Serial PCI Card
  2. 2 Port Serial PCI Card

USB Modem

Link that sells the USB modem (sorry it's in greek, I couldn't find any other site for it):

lsusb recognizes it as:

Bus 001 Device 002: ID 0483:7554 SGS Thomson Microelectronics 56k SoftModem
  idVendor           0x0483 SGS Thomson Microelectronics
  idProduct          0x7554 56k SoftModem

The driver known to work with it is the 'slusb' SmartLink driver, see slmodem.

The modem is installed under /dev/ttySL0. Special Hylafax configuration does not appear to be necessary.

Another one that works with the cdc_acm module, limited testing with Hylafax, is the TRENDnet TFM-561U. Under Debian Squeeze this is plug-and-play.

lsusb info:

Bus 007 Device 002: ID 0572:1329 Conexant Systems (Rockwell), Inc. 
  idVendor           0x0572 Conexant Systems (Rockwell), Inc.
  idProduct          0x1329 

The (first) device is /dev/ttyACM0. Hylafax's faxaddmodem seemed to have configured it correctly.

Adding a Dial Prefix

To configure HylaFax to dial a number and pause before dialing the requested number, use your favorite text editor to add the following line to your config.<DEVICE> files:

ModemDialCmd: ATDT9,%s

ModemDialCmd: ATDT9,W%s

ModemDialCmd:     ATX3DT8,,,%s

AT - picks up the phone, X3- disables dial tone check, DT tells it to use tone, dial 8, then ",,," for wait, then the phone number.

Multiple Incoming Fax Lines

Configuring a multi-port serial PCI card

dmesg |grep tty

faxserver:~# dmesg |grep ttyS
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS14 at I/O 0xdf08 (irq = 209) is a 16550A
ttyS15 at I/O 0xdf10 (irq = 209) is a 16550A

lspci -v

This should list something like:

0000:02:00.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01) (prog-if 02 [16550])
        Subsystem: LSI Logic / Symbios Logic 2S (16C550 UART)
        Flags: medium devsel, IRQ 209
        I/O ports at df08 [size=8]
        I/O ports at df10 [size=8]
        I/O ports at df18 [size=8]
        I/O ports at df20 [size=8]
        I/O ports at df28 [size=8]
        I/O ports at df30 [size=16]

apt-get update
apt-get install setserial

setserial -g /dev/ttyS*

ls /dev/ttyS*





Common Errors

Minicom works, but faxaddmodem does not see a modem

Failure to receive silence

Class1SwitchingCmd: "<delay:7>"

T.30 T2 timeout, expected signal not received

Unspecified Phase C error, including too much delay between TCF and +FDR command

No Dial Tone

No carrier Detected

cat /var/spool/hylafax/log/xferfaxlog

Modem Wedged

After a month of good work (11,000 faxes) suddenly the modem become wedged. Because USR modem doesn't have the un-wedged option as the Mainpine modem, you have to tell hylafax to try to set it up more then (default)2 times. Add this to your config.tty#

MaxSetupAttempts:    10

4 ports serial card, more then 4 modem support

dmesg |grep Serial

 Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled

serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
 00:08: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
 0000:05:04.0: ttyS0 at I/O 0x1010 (irq = 201) is a 16550A
 0000:05:04.0: ttyS1 at I/O 0x1018 (irq = 201) is a 16550A
 0000:05:04.0: ttyS3 at I/O 0x1020 (irq = 201) is a 16550A

Couldn't register serial port 0000:05:04.0: -28

shows that ttyS2 is on the motherboard.  ttyS0, S1, and S3 are
on the 9845 card.  The driver found the fourth port on the 9845 card,
but couldn't use it because all four ports (ttyS0-ttyS3) were already
in use (that's what the "-28" error means).

lspci -v

 2 port:
 02:00.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O
 Controller (rev 01) (prog-if 02 [16550])
         Subsystem: LSI Logic / Symbios Logic 2S (16C550 UART)
         Flags: medium devsel, IRQ 209
         I/O ports at df08 [size=8]
         I/O ports at df10 [size=8]
         I/O ports at df18 [size=8]
         I/O ports at df20 [size=8]
         I/O ports at df28 [size=8]
         I/O ports at df30 [size=16]

 4 port:
 02:02.0 Serial controller: Unknown device 9310:9845 (rev 01) (prog-if 02
         Subsystem: LSI Logic / Symbios Logic Unknown device 0004
         Flags: medium devsel, IRQ 201
         I/O ports at 1000 [size=8]
         I/O ports at 1008 [size=8]
         I/O ports at 1010 [size=8]
         I/O ports at 1018 [size=8]
         I/O ports at 1020 [size=8]
         I/O ports at 1030 [size=16]

To update under Grub

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda1 ro 8250.nr_uarts=16


To update under Grub2

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet 8250.nr_uarts=16"


Then confirm everything is working

setserial -g /dev/ttyS*

faxserver:/home/lucas# setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x1010, IRQ: 201
/dev/ttyS10, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS11, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS12, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS13, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS14, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS15, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS2, UART: 16550A, Port: 0x1018, IRQ: 201
/dev/ttyS3, UART: 16550A, Port: 0x1020, IRQ: 201
/dev/ttyS4, UART: 16550A, Port: 0x1010, IRQ: 201
/dev/ttyS5, UART: 16550A, Port: 0x1018, IRQ: 201
/dev/ttyS6, UART: 16550A, Port: 0x1020, IRQ: 201
/dev/ttyS7, UART: 16550A, Port: 0x1028, IRQ: 201
/dev/ttyS8, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS9, UART: unknown, Port: 0x0000, IRQ: 0


Archive Faxes

crontab -e

1 0 * * * python /usr/local/bin/ /var/spool/hylafax/recvq tif

python /usr/local/bin/ /var/spool/hylafax/recvq tif

Send batch faxes



sendfax -z batchfaxnumbers.csv FILE2007NEWS.pdf

sendfax -h ttyS0@localhost -n -k 'now + 24 hours' -z batchfaxnumbers.csv FILE2007NEWS.pdf


faxstat -s

Restart Hylafax

/etc/init.d/hylafax restart

Checking Fax Status

To check the status of hylafax, we use the faxstat command:


faxserver:~# faxstat
HylaFAX scheduler on localhost.localdomain: Running
Modem ttyS15 (1.773.123.1234): Running and idle
Modem ttyS14 (1.773.123.1234): Running and idle

Removing a fax job

to remove a sent fax from the queue, issue the following command:

faxrm  jobid

Where JOBID is the ID of the job in question.

You can also remove multiple faxes at once, like the following:

faxrm 1011 1012 1013

If you have more then a 100 faxes to remove

Don't do this:


faxrm $(seq 1 100)

Printer not printing

Country Specific