For fax spooling and processing the queue, four additional utility programs are provided:
faxspool
will spool a number of files (accepting various formats)
and put them into the fax spool directory. Its syntax is:
faxspool [options] phone-number input-file(s)
‘phone-number’ can be an alias, in this case the private and global alias files $HOME/.faxnrs and /usr/local/etc/mgetty+sendfax/faxaliases will be searched for a line starting with this alias. The remainder of this line will then be used as fax number.
faxspool
interacts with the file
program and
/etc/magic to determine the file type of the input files. If your
/etc/magic lacks entries for the various bitmap files, take a look
at fax/etc-magic, it contains the most important magic numbers.
faxspool
reads the text to put on top of each fax page from a text
file. The text file is (in order of precedence) the argument of the option
-h, the $HOME/.faxheader and as system-wide default
/usr/local/etc/mgetty+sendfax/faxheader. This file must
contain pure ASCII text. Some tokens are replaced by the actual values:
@T@ becomes the destination phone number, @P@ becomes the actual and
@M@ the total page number, and @U@ is replaced by the user name. If
your fax modem cuts of a few lines on top of each page, it may be a good
idea to put a blank line before the header line itself, and it is also a
good idea to indent the line about 5 spaces.
For the available options, please read the faxspool.1 man page.
faxrunq
will read this directory and try to send all the faxes
queued there (time scheduling is available, but primitive). If faxrunq
succeeds, the fax is deleted and the sender is mailed. If it does not
succeed after five tries (‘BUSY’ or a locked fax modem do
not count for this) it will send a mail and not try any further
to send this fax. (This should prevent your faxmodem from making you
bancrupt…).
faxrunq
should be called at regular intervals from cron
to
process the queued jobs. It should only be executed by root, to
make sure that all the files in the fax spool directory are read- and
writeable.
faxq
will display all entries in the fax queue. If called with
the ‘-o’ parameter, it will also display completed, but not yet
deleted jobs (JOB.done files). If called with the ‘-v’ parameter, the
output will be more verbose.
Jobs that are just being sent are not shown (faxq
doesn’t see locked
jobs)
faxrm
can be used to remove fax jobs from the queue. It is called
with the job ids of the to-be-removed faxes as command line argument. The
job ids are those that faxq
returns.
These utilities do still have some rough edges, but I think they are fairly usable by now.
Earlier variants of those utilities had to be configured in the source
code, from release 0.20 on, this is done by make
. Please check the
scripts nevertheless, whether all directories and files are set up
properly.