2. Installation Hylafax

Bevor die Faxserversoftware gebaut werden kann, müssen mit apt-get -y install libtiff-tools libtiff4 libtiff4-dev gs noch ein paar Debian-Pakete installiert werden:

debian:~# apt-get -y install libtiff-tools libtiff4 libtiff4-dev gs
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut... Fertig

[...]

Updating category gsfontderivative..
Updating category truetype..
Updating category cid..
Updating category cmap..
Updating category psprint..

debian:~#

Jetzt müssen Sie über den auf der Hylafax-Homepage http://www.hylafax.org vorhandenen Download-Link die aktuellen Sourcen herunterladen. Natürlich geht dies auch mit dem Command-Line-Befehl wget ftp://ftp.hylafax.org/source/hylafax-4.3.1.tar.gz.

debian:~# cd /usr/src/
debian:/usr/src# wget ftp://ftp.hylafax.org/source/hylafax-4.3.1.tar.gz
--12:35:25--  ftp://ftp.hylafax.org/source/hylafax-4.3.1.tar.gz
           => `hylafax-4.3.1.tar.gz'
Auflösen des Hostnamen »ftp.hylafax.org«.... 66.179.245.142
Verbindungsaufbau zu ftp.hylafax.org[66.179.245.142]:21... verbunden.
Anmelden als anonymous ... Angemeldet!
==> SYST ... fertig.    ==> PWD ... fertig.
==> TYPE I ... fertig.  ==> CWD /source ... fertig.
==> PASV ... fertig.    ==> RETR hylafax-4.3.1.tar.gz ... fertig.
Länge: 1,498,444 (unmaßgeblich)

100%[====================================>] 1,498,444    229.94K/s    ETA 00:00

12:35:33 (217.14 KB/s) - »hylafax-4.3.1.tar.gz« gespeichert [1498444]

debian:/usr/src#

Danach mit tar -xzf hylafax-4.3.1.tar.gz entpacken und ./configure aufrufen.

debian:/usr/src# tar xfz hylafax-4.3.1.tar.gz 
debian:/usr/src# cd hylafax-4.3.1
debian:/usr/src/hylafax-4.3.1# ./configure

Configuring HylaFAX (tm) (aka FlexFAX) 4.3.1.

If configure does the wrong thing, check the file config.log for
information that may help you understand what went wrong.

Reading site-wide parameters from ./config.site.
Gosh, aren't you lucky to have a i686-pc-linux-gnu system!
Using /usr/bin/gcc for a C compiler (set CC to override).
Looks like /usr/bin/gcc supports the -g option.
Using " -g" for C compiler options.

[...]

Mit ./configure werden die Sourcen für das Übersetzen vorbereitet, das heißt, es wird überprüft, ob alle Voraussetzungen erfüllt sind. Wenn dies der Fall ist, fragt das Programm diverse Parameter ab.

HylaFAX configuration parameters (part 1 of 2) are:

[ 1] Directory for applications:        /usr/local/bin
[ 2] Directory for lib data files:      /usr/local/lib/fax
[ 3] Directory for lib executables:     /usr/local/sbin
[ 4] Directory for system apps:         /usr/local/sbin
[ 5] Directory for manual pages:        /usr/local/man
[ 6] Directory for HTML documentation:  /var/httpd/htdocs/hylafax
[ 7] Directory for spooling:            /var/spool/hylafax
[ 8] Directory for uucp lock files:     /var/lock
[ 9] Uucp lock file scheme:             ascii
[10] PostScript imager package:         gs
[11] PostScript imager program:         /usr/bin/gs
[12] Manual page installation scheme:   bsd-source-cat
[13] Default page size:                 North American Letter
[14] Default vertical res (lpi):        98

Are these ok [yes]?

Hier müssen für den Betrieb in Deutschland die Werte für das Papierformat auf A4 gesetzt werden:

Are these ok [yes]?13
Default page size [North American Letter]? A4

HylaFAX configuration parameters (part 1 of 2) are:

[ 1] Directory for applications:        /usr/local/bin
[ 2] Directory for lib data files:      /usr/local/lib/fax
[ 3] Directory for lib executables:     /usr/local/sbin
[ 4] Directory for system apps:         /usr/local/sbin
[ 5] Directory for manual pages:        /usr/local/man
[ 6] Directory for HTML documentation:  /var/httpd/htdocs/hylafax
[ 7] Directory for spooling:            /var/spool/hylafax
[ 8] Directory for uucp lock files:     /var/lock
[ 9] Uucp lock file scheme:             ascii
[10] PostScript imager package:         gs
[11] PostScript imager program:         /usr/bin/gs
[12] Manual page installation scheme:   bsd-source-cat
[13] Default page size:                 ISO A4
[14] Default vertical res (lpi):        98

Are these ok [yes]?

[Tipp]Tipp

Wer will, kann hier auch die Auflösung ändern. Da im Geschäftsumfeld über einen solchen Faxserver wahrscheinlich auch Briefe und Verträge verschickt werden, können Sie die Auflösung bei entsprechendem Bedarf auf 196 lpi einstellen (feine Auflösung).[125]

Are these ok [yes]? 14
Default vertical res (lpi) [98]? 196

HylaFAX configuration parameters (part 1 of 2) are:

[ 1] Directory for applications:        /usr/local/bin
[ 2] Directory for lib data files:      /usr/local/lib/fax
[ 3] Directory for lib executables:     /usr/local/sbin
[ 4] Directory for system apps:         /usr/local/sbin
[ 5] Directory for manual pages:        /usr/local/man
[ 6] Directory for HTML documentation:  /var/httpd/htdocs/hylafax
[ 7] Directory for spooling:            /var/spool/hylafax
[ 8] Directory for uucp lock files:     /var/lock
[ 9] Uucp lock file scheme:             ascii
[10] PostScript imager package:         gs
[11] PostScript imager program:         /usr/bin/gs
[12] Manual page installation scheme:   bsd-source-cat
[13] Default page size:                 ISO A4
[14] Default vertical res (lpi):        196

Are these ok [yes]?

Alle anderen Werte auf dieser Seite können so bleiben, wir bestätigen also mit yes.

Are these ok [yes]? yes

HylaFAX configuration parameters (part 2 of 2) are:

[15] Location of getty program:         /sbin/agetty
[16] Location of voice getty program:   /bin/vgetty
[17] Location of sendmail program:      /usr/sbin/sendmail
[18] Location of TIFF tools:            /usr/bin
[19] Location of SysV init scripts:     /etc/init.d
[20] Location of SysV start scripts:    ../rc2.d ../rc3.d ../rc4.d ../rc5.d
[21] Location of SysV stop scripts:     ../rc0.d ../rc1.d ../rc6.d
[22] Name of SysV start script:         S97hylafax
[23] Name of SysV stop script:          K05hylafax
[24] Init script starts faxq:           yes
[25] Init script starts hfaxd           yes
[26] Start old protocol:                no
[27] Start paging protocol:             no
Are these ok [yes]?

Auch hier muss nichts verändern werden (also einfach mit yes übernehmen). Danach werden automatisch alle zum Kompilieren benötigten Makefiles angelegt. Das Kompilieren starten wir mit make und danach können wir mit einem make install die Software installieren.

debian:/usr/src/hylafax-4.3.1# make
make[1]: Entering directory `/usr/src/hylafax-4.3.1'
= regex
make[2]: Entering directory `/usr/src/hylafax-4.3.1/regex'
make[3]: Entering directory `/usr/src/hylafax-4.3.1/regex'
make[4]: Entering directory `/usr/src/hylafax-4.3.1/regex'
/bin/bash ../port/mkdepend   -e 's@ /usr/include/@ /@' -c /usr/bin/gcc -D__ANSI_CPP__ -I. -I.. -I.././regex -I.././regex -I.././util -I/usr/local/include -g -fpic -O -c -M  -i Makedepend regexec.c regcomp.c regfree.c regerror.c
make[4]: Leaving directory `/usr/src/hylafax-4.3.1/regex'

[...]

for i in README depend make.links preremove proto.local ; do    \
        [ -f $i ]  ||  cp .././pkg/$i . ;                       \
done 
make[2]: Leaving directory `/usr/src/hylafax-4.3.1/pkg'
make[1]: Leaving directory `/usr/src/hylafax-4.3.1'
debian:/usr/src/hylafax-4.3.1# make install

[...]

if test -d /etc/config; then \
    /bin/bash ../port/install.sh  -idb hylafax.sw.server -F /etc/config -m 644 -src config.fax -O fax; \
fi
make[1]: Leaving directory `/usr/src/hylafax-4.3.1/etc'
debian:/usr/src/hylafax-4.3.1#

Der nächste Schritt ist das Setup des Faxservers. Hierzu rufen wir das Programm faxsetup auf:

debian:/usr/src/hylafax-4.3.1# faxsetup

[...]

There does not appear to be an entry for the FaxMaster either in
the YP/NIS database or in the /etc/aliases file.  The
FaxMaster is the primary point of contact for HylaFAX problems. 
The HylaFAX client-server protocol server identifies this alias as
the place to register complaints and HylaFAX directs automatic mail
messages to this user when problems are identified on a server
machine or when the routine server maintainence scripts are run
(e.g. faxcron).

Should an entry be added for the FaxMaster to /etc/aliases [yes]?

Bei den folgenden 2-3 Fragen einfach immer Enter drücken.

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

Bei den folgenden Einstellungen müssen Sie die für Ihre Installation geeigneten Werte eingeben:

No scheduler config file exists, creating one from scratch.
Country code [1]? 49
Area code []? 69
Long distance dialing prefix [1]? 0
International dialing prefix [011]? 00
Dial string rules file (relative to /var/spool/hylafax) ["etc/dialrules"]?
Tracing during normal server operation [1]?
Default tracing during send and receive sessions [0xffffffff]?
Continuation cover page (relative to /var/spool/hylafax) []?
Timeout when converting PostScript documents (secs) [180]?
Maximum number of concurrent jobs to a destination [1]?
Define a group of modems []?
Time of day restrictions for outbound jobs ["Any"]?
Pathname of destination controls file (relative to /var/spool/hylafax) []?
Timeout before purging a stale UUCP lock file (secs) [30]?
Max number of pages to permit in an outbound job [0xffffffff]?
Syslog facility name for ServerTracing messages [daemon]?

The non-default scheduler parameters are:

CountryCode:            49
AreaCode:               69
LongDistancePrefix:     0
InternationalPrefix:    00

Are these ok [yes]?

Dabei sind an sich nur die ersten vier Fragen wichtig. Die erste betrifft die Landesvorwahl als zweistellige Zahl, für Deutschland also die 49. Dann folgt die Ortsnetznummer ohne führende Null, in diesem Beispiel die 69 für Frankfurt am Main. Dann eine Null für Ferngespräche und zwei Nullen für internationale Gespräche. Am Schluss mit yes bestätigen.

Restarting HylaFAX server processes.
Should I restart the HylaFAX server processes [yes]?

/etc/init.d/hylafax start
HylaFAX: faxq hfaxd (without old protocol & without SNPP support).

You do not appear to have any modems configured for use.  Modems are
configured for use with HylaFAX with the faxaddmodem(8C) command.
Do you want to run faxaddmodem to configure a modem [yes]?

Jetzt bestätigen wir den Restart des Serverprozesses mit yes und werden gefragt, ob wir ein Modem installieren wollen. Da unser IAXmodem bereits eingerichtet ist, können wir hier direkt weitermachen und bestätigen wieder mit yes.

Serial port that modem is connected to []? ttyIAX0

Ok, time to setup a configuration file for the modem.  The manual
page config(5F) may be useful during this process.  Also be aware
that at any time you can safely interrupt this procedure.

Reading scheduler config file /var/spool/hylafax/etc/config.

No existing configuration, let's do this from scratch.

Country code [1]? 49
Area code [415]? 69
Phone number of fax modem [+1.999.555.1212]? +49 69 12345678
Local identification string (for TSI/CIG) ["NothingSetup"]? Apfelmus GmbH
Long distance dialing prefix [1]? 0
International dialing prefix [011]? 00
Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]?
Tracing during normal server operation [1]?
Tracing during send and receive sessions [11]?
Protection mode for received facsimile [0600]?
Protection mode for session logs [0600]?
Protection mode for ttyIAX0 [0600]?
Rings to wait before answering [1]?
Modem speaker volume [off]?
Command line arguments to getty program ["-h %l dx_%s"]?
Pathname of TSI access control list file (relative to /var/spool/hylafax) [""]?
Pathname of Caller-ID access control list file (relative to /var/spool/hylafax) [""]?
Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]?
Tag line format string ["From %%l|%c|Page %%P of %%T"]?
Time before purging a stale UUCP lock file (secs) [30]?
Hold UUCP lockfile during inbound data calls [Yes]?
Hold UUCP lockfile during inbound voice calls [Yes]?
Percent good lines to accept during copy quality checking [95]?
Max consecutive bad lines to accept during copy quality checking [5]?
Max number of pages to accept in a received facsimile [25]?
Syslog facility name for ServerTracing messages [daemon]?
Set UID to 0 to manipulate CLOCAL [""]?
Use available priority job scheduling mechanism [""]?

The non-default server configuration parameters are:

CountryCode:            49
AreaCode:               69
FAXNumber:              +49 69 12345678
LongDistancePrefix:     0
InternationalPrefix:    00
DialStringRules:        etc/dialrules
SessionTracing:         11
RingsBeforeAnswer:      1
SpeakerVolume:          off
GettyArgs:              "-h %l dx_%s"
LocalIdentifier:        Apfelmus GmbH
TagLineFont:            etc/lutRS18.pcf
TagLineFormat:          "From %%l|%c|Page %%P of %%T"
MaxRecvPages:           25

Are these ok [yes]?

Fragen über Fragen, aber nur die wenigsten sind wirklich wichtig.[126] Wichtig sind natürlich die Faxnummer und der sogenannte LocalIdentifier. Das ist der Text, der auf jedem gesendeten Fax in der obersten Zeile steht.

Yes bringt uns weiter zur Modemerkennung.

Now we are going to probe the tty port to figure out the type
of modem that is attached.  This takes a few seconds, so be patient.
Note that if you do not have the modem cabled to the port, or the
modem is turned off, this may hang (just go and cable up the modem
or turn it on, or whatever).

Probing for best speed to talk to modem: 38400 OK.

About fax classes:

The difference between fax classes has to do with how HylaFAX interacts
with the modem and the fax protocol features that are used when sending
or receiving faxes.  One class isn't inherently better than another;
however, one probably will suit a user's needs better than others.

Class 1 relies on HylaFAX to perform the bulk of the fax protocol.
Class 2 relies on the modem to perform the bulk of the fax protocol.
Class 2.0 is similar to Class 2 but may include more features.
Class 1.0 is similar to Class 1 but may add V.34-fax capability.
Class 2.1 is similar to Class 2.0 but adds V.34-fax capability.

HylaFAX generally will have more features when using Class 1/1.0 than
when using most modems' Class 2 or Class 2.0 implementations.  Generally
any problems encountered in Class 1/1.0 can be resolved by modifications
to HylaFAX, but usually any problems encountered in Class 2/2.0/2.1 will
require the modem manufacturer to resolve it.

If you're unsure and your modem supports it, use Class 1.

This modem looks to have support for Class 1 and 1.0.
How should it be configured [1]?1
Hmm, this looks like a Class 1 modem.
Product code (ATI0) is "spandsp".
Other information (ATI3) is "www.soft-switch.org".
DTE-DCE flow control scheme [default]?
Modem manufacturer is "spandsp".
Modem model is "IAXmodem".

Using prototype configuration file iaxmodem...

The modem configuration parameters are:

ModemResetCmds:         "ATH1\nAT+VCID=1"

Are these ok [yes]?

Creating new configuration file /var/spool/hylafax/etc/config.ttyIAX0...
Creating fifo /var/spool/hylafax/FIFO.ttyIAX0 for faxgetty... done.
Done setting up the modem configuration.

Checking /var/spool/hylafax/etc/config for consistency...
...some parameters are different.

The non-default scheduler parameters are:

CountryCode:            49
AreaCode:               69
LongDistancePrefix:     0
InternationalPrefix:    00
DialStringRules:        etc/dialrules

Are these ok [yes]?

Das Modem wurde erkannt und wir werden gefragt, ob es ein Class 1-Modem ist. Da das genau das ist, was wir wollen, bestätigen wir. Auch das Reset-Kommando für das Modem können wir so übernehmen. Wenn alles in Ordnung ist, bestätigen wir mit yes.

Creating new configuration file /var/spool/hylafax/etc/config...
...saving current file as /var/spool/hylafax/etc/config.sav.

Don't forget to run faxmodem(8C) (if you have a send-only environment)
or configure init to run faxgetty on ttyIAX0.
Do you want to run faxaddmodem to configure another modem [yes]? no

You do not appear to be using faxgetty to notify the HylaFAX scheduler
about new modems and/or their status.  This means that you must use the
faxmodem program to inform the new faxq process about the modems you
want to have scheduled by HylaFAX.  Beware that if you have modems that
require non-default capabilities specified to faxmodem then you should
read faxmodem(8C) manual page and do this work yourself (since this
script is not intelligent enough to automatically figure out the modem
capabilities and supply the appropriate arguments).

Should I run faxmodem for each configured modem [yes]?
/usr/local/sbin/faxmodem ttyIAX0

Done verifying system setup.

Ein zweites Modem haben wir nicht, also beantworten wir die Frage mit no. Das Ausführen von faxmodem macht durchaus Sinn, denn dadurch sind die Modems an Hylafax angebunden.

Jetzt ist das Hylafax zum Senden von Faxen eingerichtet. Aber vielleicht möchten Sie ja auch welche empfangen. Dazu brauchen wir einen getty, der am IAXmodem auf Verbindungen lauscht. Das erreicht man ganz einfach durch einen weiteren Eintrag in der Datei /etc/inittab.

mo00:23:respawn:/usr/local/sbin/faxgetty ttyIAX0


[125] Damit ist sichergestellt, dass auch das Kleingedruckte noch gut zu lesen ist. ;-)

[126] Mögen die Leute verzeihen, die schon einmal ein Hylafax getunt haben, aber für den Anfang reichen die Defaults.


Version 1.2, November 2002

Neue Version verfügbar

Sie betrachten gerade die alte Version des Buches (Version 1.0). Wir empfehlen Ihnen für Asterisk 1.4 und 1.6 die neue Version des Buches.

Asterisk-Tag 2008

Lernen Sie Mark Spencer (den Erfinder von Asterisk) kennen! Viele Vorträge, Case-Studies und Workshops rund um das Thema VoIP. Asterisk-Tag.org

Das gedruckte Buch