About the author:
Mark Nielsen works at AudioBoomerang.com which
creates, delivers, and tracks personalized multimedia email,
web, and newsletter campaigns. He works as a consultant
delivering end products to AudioBoomerang.com clients, such as
advanced customized statistical reports used for demographic or
pyschological profiles for future campaigns. In his spare time,
he writes articles relating to Free Software (GPL) or Free
Literature (FDL) and is involved with the non-profit learning
center eastmont.net.
Content:

Receiving faxes with efax.

Abstract:

Setting up Efax to send and receive faxes on RedHat 7.2.

_________________ _________________ _________________

Purpose

I wanted to setup a fax server. I thought about using HylaFax,
but my RedHat system already had mgetty installed which clashed
with HylaFax when I tried to install the HylaFax rpm. Also, it
seems like if I do it right, I might be able to use mgetty to
do logins and voice sessions as well as fax sessions. For now,
I just wanted to receive faxes with the default installation of
RedHat 7.2 without additional software.

Efax and fax are really the same thing. 'fax' is just a
script calling efax.

Config Files

There are two files you can configure to get things working :
/usr/bin/fax and /etc/inittab.

Copy /usr/bin/fax to /usr/bin/fax_custom, and I changed the
following lines:

The nice thing is, if you kill the process id "1698", it
will respawn and I believe reread the /usr/bin/fax_custom file.
Thus, if you make changes to that file, just kill the process
running efax before you try to fax to it when you want to test
your configuration.

What do you do after you receive
faxes?

Well, run a cron job that sorts the files in
/var/spool/fax/incoming, creates a lock file for each group of
faxes, and then either convert them to pdf for viewing on the
web or directly print them out.

If you want to print it out, use efix like,

efix -ops fax_20020606_014847.001 | lpr

I would recommend that you print the file and then store it
in a backup directory.

Sending faxes

Setting up the print service was much tougher than I had
thought. First, do what the manpage says (with some
alterations):

This part I really hate, but I had to "chmod 666
/dev/ttyS1" so that the lpr user which controls print jobs
can use the modem.

The perl script make it so faxlpr can find the process
number and changing the "fax" command to "efax" was required
because it attempted to create lock files which I didn't want
it to create.

I believe my method of sending faxes also breaks the lock
files, so it might screw up if you try to send a fax while it
is receiving one.

After all this pain and suffering, your program that prints
needs to be able to specify the "-J" option so that it can do a
command like 'lpr -P fax -J "555 1212" file.ps'. Otherwise,
print to a file and then print that file out with a line
command.

Also, you could just use the efax command to send out a fax
and not do it through the print service. You have to use gs to
convert it before you send it out, which is still a pain.

Conclusions.

Whenever I get the chance, I will try and see if I can:

Send out faxes with samba with mgetty. I would replace
/usr/bin/fax_custom with mgetty in inittab so that I can
receive and send faxes without all the cludges. Receiving
faxes and manually sending them with efax was okay, just
sending them through the print service ws a pain.

See if I can use mgetty not only for faxes, but voice and
login sessions.

Efax is only a temporary solution before I figure out how to
get mgetty to work (which I tried to but failed). The only
reason why I didn't use hylafax was because it clashed with
mgetty when I tried to install the rpm and then I got
interested in mgetty, and then diverted with efax. I am going
to try and use mgetty in the future since I would like voice
and login sessions as well with the same modem. It seems like
it might be possible to use voice, login, and fax all on the
same modem -- but it seems like there might be some problems
with some modems to properly detect fax vs voice vs login. I
really don't like sending out faxes with efax and the print
service. I hope mgetty will solve some issues I had.