Previous: , Up: Fax   [Contents]

3.8 Runtime configuration for sendfax: sendfax.config

Basically, sendfax can work very well with the compiled-in defaults (from policy.h), sometimes slightly modified by command line options.

If you use more than one fax modem, possibly of different type, this is very awkward, because the command line will get very long. For that reason, there is a configuration file which will control nearly every detail of sendfax’ behaviour.

It is usually named /usr/local/etc/mgetty+sendfax/sendfax.config.

The config file consists of multiple sections, separated from each other by the keyword ‘port’. All configuration options given before the first ‘port’ statement specify global options, and everything between two ‘port’ statements applies only for the device with the given name (‘port’ takes an argument). Let me show you an example:

# global defaults:
# fax station id is always the same
fax-id ++49-89-1234
# always have the speaker on
modem-init ATM1L3

# port specific: for /dev/tty1a, switch the speaker off
port tty1a
modem-init ATM0L0

# port specific: for ttyS1, use another fax station id
port ttyS1
fax-id ++1234567

As you can see, empty lines and comment lines (starting with "#") are allowed.

Every line in the config file that is not a comment - or empty - starts with a keyword (listed in detail below), followed by a "data" field. In the example above, ‘fax-id’ is the keyword, ‘++49-89-1234’ is the corresponding data, the fax ID for the sending machine. Most data fields are strings, but there are a few boolean and integer items.

The available keywords are (if it’s possible to set this item from the command line, the flag is given in brackets).

To show you how it will look like, I have included a sample sendfax.config file below. Three modem lines exist on my system, all modems have different initialization and flow control commands, and on one line I have to tell the modem to use pulse dial because the PBX is too old.

# sample configuration file for sendfax

# global settings
verbose y
# the modems are attached to the following ports:
fax-devices tty1a:tty2a:tty4c

# this is my fax number
fax-id +49-89-xxxxxx

# generic defaults
modem-init ATL3M1
dial-prefix ATD
debug 4

# port specific overrides

# Zoom 28K8
port tty1a
  modem-handshake AT&K4

# MultiTech
port tty2a
  dial-prefix ATDP
#                ^^^ this means "no extra command to set modem handshake"
  debug 9

# ZyXEL 
port tty4c
  modem-init ATM1L2
  modem-handshake AT&H3

Previous: , Up: Fax   [Contents]