Installazione di Hylafax come fax in ricezione

From RVM Wiki
Jump to navigation Jump to search

Test del modem

Collegare ed accendere il modem. Verificare la porta seriale a cui è collegato. In Linux le seriali si chiamano così:

  • COM1=ttyS0
  • COM2=ttyS1
  • ....

Supponendo che il modem sia installato su COM2=ttyS1, testiamolo per vederese funziona:

cat /dev/ttyS1 &
echo -en "ATz\r" > dev/ttyS1

Si deve ricevere la risposta:

ATZ

OK

Dopodichè, killare il cat precedentemente lasciato in background:

killall cat

Installazione pacchetti

apt-get install hylafax-server hylafax-client hylafax-doc setserial

Leggere ed accettare i default

 +----------------------------¦ HylaFAX Server +-----------------------------+
 ¦                                                                           ¦
 ¦ Check base64 encoders                                                     ¦
 ¦                                                                           ¦
 ¦ Hylafax is able to send received faxes via email. These emails need to    ¦
 ¦ include base64 encoded attachments. Since this is not essential to        ¦
 ¦ hylafax to work, you need to manually do some further steps: you should   ¦
 ¦ install a package that provide encoders (like mime-codecs or sharutils)   ¦
 ¦ and run 'faxsetup -server' that will automatically check for those        ¦
 ¦ encoders and change its configuration.                                    ¦
 ¦                                                                           ¦
 ¦                                  <Ok>                                     ¦
 ¦                                                                           ¦
 +---------------------------------------------------------------------------+

 +----------------------------¦ HylaFAX Server +-----------------------------+
 ¦                                                                           ¦
 ¦ Don't forget to setup a modem line                                        ¦
 ¦                                                                           ¦
 ¦ Hylafax is now installed as a server but you still have to configure at   ¦
 ¦ least a modem in order to send or receive faxes. Please use faxaddmodem   ¦
 ¦ in order to define a modem and the restart hylafax so that it will use    ¦
 ¦ the new configuration.                                                    ¦
 ¦                                                                           ¦
 ¦                                  <Ok>                                     ¦
 ¦                                                                           ¦
 +---------------------------------------------------------------------------+

 +----------------------------¦ HylaFAX Server +-----------------------------+
 ¦                                                                           ¦
 ¦ Hylafax is already configured and may be started now. If you specify to   ¦
 ¦ start it later manually, remember to change the value of RUN_HYLAFAX in   ¦
 ¦ /etc/default/hylafax.                                                     ¦
 ¦                                                                           ¦
 ¦ Start the HylaFAX daemon now?                                             ¦
 ¦                                                                           ¦
 ¦                    <Yes>                       <No>                       ¦
 ¦                                                                           ¦
 +---------------------------------------------------------------------------+


Configurazione del Sistema e del Modem

Lanciare il comando che chiederà come configurare il sistema:

faxsetup

Cambiare solo i valori che si reputano necessari, lasciare gli altri come default.

Applicare la configurazione

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


Configurazione del recapito dei fax ricevuti

Riferimento: Handbook:Server Operation:Receiving Faxes o man faxrcvd

Creare il file /var/spool/hylafax/etc/FaxDispatch :

cat > /var/spool/hylafax/etc/FaxDispatch <<EOFile
FILETYPE=pdf
# allega i fax come pdf all'email
SENDTO=nome.cognome@dominio.com
# imposta questo come mittente
FROMADDR=nome.cognome
# inoltra i fax a questo destinatario locale
NOTIFY_FAXMASTER=never
# evita di mandarne una copia anche al FaxMaster
EOFile

Abilitazione dello script di maintenance

Riferimento: man faxcron

E' opportuno attivare uno script di cron che provvede a ripulire le copie dei fax ricevuti e lasciati in /var/spool/hylafax/recvq, a cancellare i log, e molto altro ancora:

cat > /etc/cron.d/faxcron <<EOFile
# Maintenance script for Hylafax.
# cleans logs, and *queues
# see man faxcron for infos
00   02    *    *    *   root /usr/sbin/faxcron
EOFile

Pr vedere l'output che genererà, lo si può lanciare in dry-run:

faxcron -n