Translation(s): English - Italiano

(!) ?Discussion


HylaFAX, un server fax open source avanzato.

Basato su http://lucasmanual.com/mywiki/FaxServer e http://www.aboutdebian.com/fax.htm

Installazione

apt-get install hylafax-server

Configurazione iniziale

Per iniziare la configurazione di hylafax eseguire l'utilità faxsetup.

faxsetup

        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]? 

        * Prefisso della nazione (1 per gli USA)
        * Prefisso della regione (inserire quello della propria zona)
        * Numero telefonico del modem fax (nel formato +1.xxx.xxx.xxxx, per gli USA)
        * Stringa di identificazione locale (dovrebbe essere qualcosa di simile a 'Mio Server Fax' che verrà stampato sulla citazione dei fax in uscita)
        * Prefisso a lunga distanza (1 negli USA)
        * Prefisso internazionale (011 negli USA)
        * File di regole di composizione (accettare il predefinito)
        * Tracciamento durante le normali operazioni server (accettare il predefinito)
        * Tracciamento durante le operazioni di invio e ricezione (accettare il predefinito)

        * Modalità di protezione per fax ricevuti - se si desidera condividere i file direttamente inserire 0644, altrimenti accettare l'impostazione predefinita 0600 
        * Modalità di protezione per la sessione dei registri - se si desidera condividere i file direttamente inserire 0644, altrimenti accettare l'impostazione predefinita 0600
        * Modalità di protezione per ttySx - per condividere il modem inserire 0666, 0600 se lo si utilizza solo con hylafax
        * Numero di squilli prima di rispondere - il valore predefinito è 1, impostarlo a 0 configura il server come un sistema fax di "solo invio"
        * Volume dell'altoparlante del modem, i valori validi sono OFF QUIET LOW MEDIUM HIGH, lo si può impostare su HIGH per fare delle prove e cambiarlo in OFF successivamente)
        * Argomenti da riga di comando per il programma getty (accettare il predefinito)
        * Percorso del file di controllo degli accessi TSI (accettare il predefinito)
        * Percorso del file di controllo degli accessi Caller-ID (accettare il predefinito)
        * File del carattere della citazione (accept the default)
        * Stringa del formato della citazione (accept the default)
        * Tempo prima di eliminare un file UUCP interrotto e bloccato (accettare il predefinito)
        * Mantenere un file di lock UUCP durante le chiamate dati in entrata (accettare il predefinito)
        * Mantenere un file di lock UUCP durante le chiamate vocali in entrata (accettare il predefinito)
        * Percentuale di linee valide da accettare durante il controllo qualità della copia (accettare il predefinito)
        * Numero massimo di linee non valide da accettare durante il controllo qualità della copia (si consiglia di ridurre il valore predefinito da 5 a 3)
        * Numero massimo di pagine da accettare in un fax ricevuto (si consiglia di aumentare il valore predefinito a 25)
        * Nome del servizio syslog per i messaggi di tracciamento del server (il predefinito è "daemon" ma lo si può cambiare in "local7" se si invia il registro ad un server syslog remoto e si vuole separare il registro dei fax da altri messaggi)
        * Imposta l'UID a 0 per gestire CLOCAL (accettare il predefinito)
        * Usa il meccanismo di schedulazione disponibile per la priorità dei compiti (accettare il predefinito)

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/issue.net

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.

192\.168\.10\.:::

172\.16\.:::

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.

Fax Dispatch

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

SENDTO=myemail@emailaddy.com;
FILETYPE=tiff;

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.

Automatically Printing Incoming Faxes

## and/or by device
FOLDER="/var/spool/hylafax/recvq/"
FULLPATH="${FOLDER}${FILENAME}.tif"
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
esac

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. http://www.hylafax.org/content/Client_Software

Linux

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 -
Accessories)
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
hang. 

Windows

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 -(newegg.com)

Multiport Serial Adapters

  1. Startech.com 4 Multi Port Serial PCI Card
  2. Startech.com 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): http://www.e-shop.gr/show_per.phtml?id=PER.533709

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.

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*

MAKEDEV ttyS14
MAKEDEV ttyS15

faxaddmodem

FaxNotify

RETURNFILETYPE=tiff;

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
 [16550])
         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]

## 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

update-grub

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

Tools

Archive Faxes

crontab -e

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

python /usr/local/bin/archive.py /var/spool/hylafax/recvq tif

Send batch faxes

17731231234
13121231234

:%s/^/1/g

sendfax -z batchfaxnumbers.csv FILE2007NEWS.pdf

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

Maintenance

faxstat -s

Restart Hylafax

/etc/init.d/hylafax restart

Checking Fax Status

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

faxstat

faxserver:~# faxstat
Password:
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

Printer not printing

Country Specifc

France