XFAXand e-mail
XFAX- User’s Guide 4.3a 28
9. XFAX and e-mail
XFAXcan be used, to advantage, as a fax gateway in a system for electronic
mail. By addressingyour letters in a special way you can send both fax and elec-
tronicmail from one and the same program, the mail client.

9.1 Sendmail

Describedbelow how this functionality is set into sendmail that is the most com-
mon program for routing mail in the UNIX environment. Send mail is a so-called
MTS, MessageTransfer Agent, which takes care of incoming and outgoing mes-
sages and ensuresthat they are passed on in the correct way.
Youbegin by deciding on a standard for how mail to the fax gatewayshould be
addressed.Below we use an example domain which is known as infoflex.se and
assumethat one machine acts as both mail and fax gateway. Let us say that the
machine is known as gw.
There are variousoptions for addressing, two of which can be
<faxno>.fax@infoflex.seand <faxno>@fax.infoflex.se. In the latter example it
is necessarythat any name servers in the network can handle fax.infoflex.se and
steeron this mail to gw.infoflex.se. Wehave also presupposed that gw.infoflex.se
lies hiddenbehind infoflex.se in the first example.
Below we use the firstexample since this does not require any changes to any
name servers.
The configurationfile for sendmail is known as sendmail.cf and is generally to
be found under /etcor /usr/lib. Furthermore, we presuppose that the software is
installedso 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
changesin this. After having verified that the new rules, which have been added,
functionas they should, you can move sendmail.xfax to sendmail.cf and run the
whole thingdistinctly. All this is done in order to avoid disturbing traffic in
progressas little as possible.
The firstthing to do is to create a new delivery method in sendmail for faxes by
settingup a new delivery handler, or delivery agent. Adding aline, most suitably
close to the other definitionsfor delivery handlers as shown below does this.
Mxfax, P=/usr/local/xfax/bin/faxmail, F=lsDFM, S=10, R=20,
A=faxmail $u
Theabove line defines a new delivery agent xfax which, when used, forwards the
messageto 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
howsuch script can appear. Study this carefully.As an argument to this program
a user namewill be sent in. In our case this user name will be the fax number to
our recipient.
Steptwo is now to set up a rule that says when the delivery agent we have
definedabove should be used. It can appear as follows: