/etc/mgetty+sendfax/mgetty.config
This config file is grouped into port-specific sections, separated by
'port tty-name' lines. Everything before the first port declaration specifies
global defaults. Here is a small example:
# Global defaults:
fax-id ++49-89-1234
# Port Specifics:
port ttyS1
modem-type auto
data-only yes
debug 4
speed 38400
ringback yes
rings 1
issue-file /etc/issue
login-prompt prompt
login-time 30
statistics-file /var/log/statistics.ttyS1
port ttyS2
debug 9
Configuration Options:
speed n
[-s] Port speed specified as an integer.
switchbd fax_rx_speed
Not usually used. Fax speed setting, usually 19200.
direct yes/no
[-r] Tells mgetty it is running on a direct line. This would
be used in a null modem connection. Since mgetty is designed
for use with a modem, the default is no.
blocking yes/no
[-b] Tells mgetty to open the device in 'blocking' mode, this
would be used to wait for a carrier detect. No useful in most
circumstances. The defualt is no.
port-owner userid/uid
If set, mgetty will chown the tty line to the given username.
You can specify a string or an integer uid. This is highly
recommended for security purposes: only give port access to
those users you trust not to misuse your modem lines.
port-group groupname/gid
If set, mgetty will chgrp the tty line to the given group id.
You can specify a string or an interger gid. If not given,
the primary group id of the 'port-owner' will be used.
port-mode permissions
Specifies the permissions to chmod the device to. *Never* make
a modem device world accessible, better use 0660 or even 0600.
toggle-dtr yes/no
Tells mgetty whether it should lover the DTR line upon startup
to reset modem. Default is yes. Some modems have a problem with this.
toggle-dtr-waittime msecs
Specifies the time to hold the DTR line low. Default is 500ms.
data-only yes/no
[-D] Tells mgetty to forget about faxing and only use the data
part of the modem. Defualt is no. You need to set this if your
modem cannot distinguish between incoming fax and data calls.
fax-only yes/no
[-F] Tells mgetty to put the modem in fax-only mode. This is used
if the modem can't distinguish fax and modem calls but the fax
is more important than data. This is also useful for restricting
data calls but allowing fax calls.
modem-type mtype
[-C] Specifies the kind of modem connected to the port.
Valid options are:
auto - Mgetty will detect the modem type itself.
data - Do not try fax initialization, same as [-D].
cls1 - Modem is a class 1 fax modem.
cls2 - Modem is a class 2 fax modem.
c2.0 - Modem is a class 2.0 fax modem.
c2.1 - Modem is a class 2.1 fax modem.
init-chat rx tx rx tx
[-m] Expect send expect send sequence. Usually begins with "".
init-chat "" ATQ0E1V1H0 OK ATL0M0S0=0 OK AT&K3 OK
modem-check-time n
Tells mgetty to check n seconds with an AT..OK sequence to
determine if the modem has crashed. If the modem does not react,
mgetty will restart itself and do a full modem reset. This is
useful if your modem tends to lockup.
rings n
[-n] Sets the number of RING messages to wait for. The default
is 1.
cnd-program pathname
Specify a program to run before answering an incoming call.
answer-chat chat_sequence
This is the command sequence that is used to answer a phone call.
The default is ' "" ATA CONNECT \c \r ', but for some modems,
you also need 'ATS0=1' in place of 'ATA'. The '\r' expect string
is not used yet.
answer-chat-timeout secs
During the answer chat sequence, the expect string must be seen
in the secs specified. Default is 80 seconds. This time must be
at least 5 seconds longer than the time set with 'ATS7=' command.
autobauding yes/no
[-a] Some modems switch their DTE line speed to the communication
line speed after connecting (after sending CONNECT 2400). Newer
modems usually have a switch to lock a DTE baud rate, which is
recommended. If your modem keeps switching speeds, use yes.
ringback yes/no
[-R] If you have to put your modem and your telephone on the same
line, you can switch on 'ringback'. This means mgetty will not
answer the line on the first ring, but remember the call, and pick
up on the second call (if applicable).
ringback-time secs
This setting specifies how much time may pass b/w the first and
the first call. Default is 30 seconds.
ignore-carrier
If your modem does not assert the DCD (carrier detect) line, or
the serial port cable or driver is not functioning correctly, it
is possible the mgetty or login will stop after nothing is sent
to the port. This option can disable the modems ability to detect
a hangup verses a proper logout. The default is false.
issue-file file
[-i] This is the file printed before the login prompt. Default
is '/etc/issue'. Some special characters are substituted.
prompt-waittime msecs
Specifies how long mgetty will wait for modem and line to settle
down before printing issue file and login prompt. Default is 500.
login-prompt prompt
[-p] This specifies the login prompt that mgetty will output.
Some special characters are substituted. The maximum length
of the login prompt is 140 characters.
login-time secs
Specifies the maximum time the user can take to log in.
login-conf-file pathname
Specifies the path and filename of the 'login.conf' The filename
given will be ignored for security reasons if the file is not
owned by 'root', or is readable or by anybody other than 'root'.
The permissions should be mode 0600 or 0200.
fax-id faxnum
[-I] This sets the fax station ID used in fax mode to id your
site to the caller.
fax-server-file poll_control_file
[-S] Specifies the fax file(s) to be sent if someone else calls
your modem in fax polling mode. This is normally a text file
containing a list of G3 files to send, one file per line. USR
modems do not support fax polling mode.
diskspace kbs
[-k] This setting tells mgetty the minimum amount of disk space
that has to be available in the fax spool directory for fax
rx to be allowed. The default is 1Mb.
notify emailaddr
Address that will get mails if a fax is rx.
fax-owner username/uid
fax-group groupname/gid
fax-mode perms
debug debug_level
[-x] Sets the amount of logging mgetty will do. A good value is
4. The data is logged in a file, usually '/var/log/mgetty.ttySx'
term terminal_type
Linux and similar OSes that have getty set the TERM=xxx terminal
type variable, and have no other method to set it (e.g. from
'/etc/profile', or '$HOME/.profile'), then mgetty can do it.
Specify 'term vt100' or whatever. The default is unset.
Special Characters:
@ - system name
\n - new line
\r - carriage return
\g - bell
\b - backspace (ascii 010)
\f - form feed (ascii 013)
\t - TAB
\P - port name
\C - date and time: ctime().
\I - connection string
\N - number of users currently logged in.
\S - port speed
\D - date (dd/mm/yy)
\T - time (hh:mm:ss)
\Y - caller id of current caller.
\digit - character with the specified octal code.