This is an el-cheapo way to implement outgoing-only text-only e-mail to
fax.

We use a $198 fax card ("The Complete FAX") in an old IBM-PC.  The PC
is set up as needed by the fax card, with the AUTOEXEC.BAT file set up
to cd into the CFAX directory (where all the fax stuff is stored),
start the fax background process, and then execute the AUTOFAX.BAT file
included in this distribution.

On our Sun mailserver, a dedicated serial line (on /dev/tty0d in our
case) runs from the Sun to the serial port on the PC.

When someone sends mail to 12345@fax.ucsd.edu, we run the mail through
the 'faxmailer' shell script, which extracts the phone number (after
applying some sanity and security checks), and then queues it into a
fax job in /var/spool/fax.

Every 15 minutes or so (from crontab), we run the 'faxq' script, which
fetches previous fax transmission history files from the PC, examines
them to determine whether the transmission was successful, whether to
requeue the message for retransmission, or to return it to the sender
as undeliverable.

It then transfers the outgoing text files to the PC, and then finally
transfers a batch script 'QUEUE.BAT' which performs the actual
transmission and then loops back to the 'AUTOFAX' batch script.

For $200 and an old PC, we have the ability for E-mail users to send
mail to Fax machines on campus (at last estimate, there were around
200-400 or so fax machines around UCSD).

This is an incredible hack that I dreamed up one afternoon, but it's
been working fine for about two months, and it has demonstrated that
people want the capability.  We're looking into getting some more
sophisticated FAX capability for our E-mail system, but the low demand
(we handle maybe two to five E-Fax messages a day now) doesn't justify
the expense of the available commercial solutions.

You'll need Kermit on both the mail server and the PC.  Or maybe you can
get fancy and use some Ethernet mechanism, but I didn't think it was
worth the cost of putting an Ethernet card into the PC and we had lots
of leftover ports on the Ariel card in our Sun.

Enjoy.  Hack on it; it'll do you good.

(BTW: this is the only document on this there is.  You're on your own
now, son.)
	- Brian Kantor, UCSD, Nov 1989
