Xfax and e-mail, 1 sendmail – Nordic Star Products 4.3A User Manual

Page 28

Advertising
background image

XFAX and e-mail

XFAX - User’s Guide 4.3a

28

9. XFAX and e-mail

XFAX can be used, to advantage, as a fax gateway in a system for electronic
mail. By addressing your letters in a special way you can send both fax and elec-
tronic mail from one and the same program, the mail client.

9.1 Sendmail

Described below how this functionality is set into sendmail that is the most com-
mon program for routing mail in the UNIX environment. Sendmail is a so-called
MTS, Message Transfer Agent, which takes care of incoming and outgoing mes-
sages and ensures that they are passed on in the correct way.

You begin by deciding on a standard for how mail to the fax gateway should be
addressed. Below we use an example domain which is known as infoflex.se and
assume that one machine acts as both mail and fax gateway. Let us say that the
machine is known as gw.

There are various options for addressing, two of which can be
<faxno>[email protected] and <faxno>@fax.infoflex.se. In the latter example it
is necessary that any name servers in the network can handle fax.infoflex.se and
steer on this mail to gw.infoflex.se. We have also presupposed that gw.infoflex.se
lies hidden behind infoflex.se in the first example.

Below we use the first example since this does not require any changes to any
name servers.

The configuration file for sendmail is known as sendmail.cf and is generally to
be found under /etc or /usr/lib. Furthermore, we presuppose that the software is
installed so that BINDIR is /usr/local/xfax/bin and that ETCDIR is /usr/local/
xfax/etc. A tip is to copy sendmail.cf to e.g. sendmail.xfax and then make the
changes in this. After having verified that the new rules, which have been added,
function as they should, you can move sendmail.xfax to sendmail.cf and run the
whole thing distinctly. All this is done in order to avoid disturbing traffic in
progress as little as possible.

The first thing to do is to create a new delivery method in sendmail for faxes by
setting up a new delivery handler, or delivery agent. Adding a line, most suitably
close to the other definitions for delivery handlers as shown below does this.

Mxfax,

P=/usr/local/xfax/bin/faxmail,

F=lsDFM,

S=10,

R=20,

A=faxmail

$u

The above line defines a new delivery agent xfax which, when used, forwards the
message to a new program, or shell script, which is known as faxmail and is to be
found under /usr/local/xfax/bin. In the XFAX distribution there is an example of
how such script can appear. Study this carefully. As an argument to this program
a user name will be sent in. In our case this user name will be the fax number to
our recipient.

Step two is now to set up a rule that says when the delivery agent we have
defined above should be used. It can appear as follows:

Advertising