📄 ch64.htm
字号:
in <TT>faxmail/mailfax.sh-smail</TT>. Restart your mail software.</P>
<P>Now, mail to <TT>user@dest.fax</TT> will be formatted and submitted as a facsimile
job to <TT>user</TT> at the specified destination. By writing a more involved <TT>mailfax</TT>
script, you can add options and display parameters such as different resolutions
by parsing the user string. See the <TT>faxgateway</TT> documentation on <TT>www.vix.com</TT>
in <TT>HylaFAX/faxgateway.html</TT> or the <TT>/sgi/fax/contrib/dirks-faxmailer/README
on sgi.com</TT> for more information.
<H4 ALIGN="CENTER"><A NAME="Heading27<FONT COLOR="#000077">Files Used</FONT></H4>
<P>HylaFAX stores its data, configuration, and faxes in several places on the file
system in Linux. Here is a list of the important files and directories:
<UL>
<LI>HylaFAX uses a spool area on the disk for sending and receiving faxes. The spooling
area is located under the directory <TT>/var/spool/HylaFAX</TT>.
<P>
<LI>The <TT>/usr/local/bin</TT> directory has the commands used by the HylaFAX package.
The commands are <TT>fax2ps</TT>, <TT>faxaddmodem</TT>, <TT>faxalter</TT>, <TT>faxanswer</TT>,
<TT>faxcover</TT>, <TT>faxmail</TT>, <TT>faxquit</TT>, <TT>faxrm</TT>, <TT>faxstat</TT>,
and <TT>sendfax</TT>.
<P>
<LI>The <TT>./etc</TT> directory stores all the configuration, access control, and
accounting information.
<P>
<LI>The <TT>./sendq</TT> directory has all the outgoing fax jobs.
<P>
<LI>The <TT>./recvq</TT> directory contains a copy of all received faxes.
<P>
<LI>The <TT>./docq</TT> and <TT>./temp</TT> subdirectories are used in fax transmission
also.
<P>
<LI>The <TT>info</TT> subdirectory contains files that describe the capabilities
of fax machines called by HylaFAX. This information is used in preparing documents
for trans-mission.
<P>
<LI>The <TT>cinfo</TT> subdirectory contains files with per-machine control parameters
to use when sending faxes.
<P>
<LI>The <TT>status</TT> subdirectory contains files to which server processes write
their current status.
<P>
<LI>The <TT>log</TT> subdirectory contains logging information about send and receive
sessions.
</UL>
<H4 ALIGN="CENTER"><A NAME="Heading28<FONT COLOR="#000077">Multiple Modems</FONT></H4>
<P>HylaFAX supports multiple fax modems on a single host. Associated with each modem
is a server process that handles transmission and asynchronous reception. Server
processes operate independently of each other and use file-locking to avoid conflicts
when handling jobs submitted for transmission. All modems are treated equally at
the same priority. A HylaFAX server process accepts messages and commands through
FIFOs. A FIFO is basically a communications data channel where the first data in
(FI) is the first data out (FO).
<H3 ALIGN="CENTER"><A NAME="Heading29<FONT COLOR="#000077">Another Fax Solution</FONT></H3>
<P>The <TT>mgetty+sendfax+vgetty</TT> package is a set of programs to send and receive
faxes in a UNIX environment. The package only supports Class 2 modems. The filename
is called <TT>mgetty+sendfax-0.98.tar.gz</TT>, and you can get it from <TT>tsx-11.mit.edu</TT>
in the <TT>/pub/linux/sources/sbin</TT> directory. There are three parts to this
package: <TT>sendfax</TT>, <TT>vgetty</TT>, and <TT>mgetty</TT>. The program <TT>mgetty</TT>
is for receiving faxes and handling external logins without killing any outgoing
calls. <TT>sendfax</TT> is a program that sends fax files. <TT>vgetty</TT> is an
extended version of <TT>mgetty</TT> that can answer the telephone like an answering
machine and record voice-mail messages in addition to <TT>mgetty</TT>'s fax or data
call handling capabilities. The entire package lets you manage faxes and voice messages.</P>
<P>So what's the difference between <TT>mgetty</TT> and the regular versions of <TT>getty</TT>?
Unlike traditional versions of <TT>getty</TT> or <TT>uugetty</TT>, which will put
a modem into auto-answer mode, <TT>mgetty</TT> does not. When a call comes in, <TT>mgetty</TT>
tells the modem to answer and tell <TT>mgetty</TT> what kind of call is being received.
If it is a fax call, <TT>mgetty</TT> will receive the fax itself. If the modem is
getting data, <TT>mgetty</TT> prompts for a user ID, and then hands the open line
off to <TT>login</TT> for a normal data login.</P>
<P>It's the modem's job to distinguish a fax call from a data call. Not all fax modems
can do this, so if yours does not, there is no way for <TT>mgetty</TT> to do this
for you. <TT>mgetty</TT> can be used with modems that cannot distinguish a fax call
from a data call, but you must tell it ahead of time what type of call to expect.
You can configure <TT>mgetty</TT> to allow for <TT>uucp</TT> and other connections.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading30<FONT COLOR="#000077"><B>NOTE: </B></FONT>Note that <TT>mgetty</TT>
also supports caller ID and can be programmed to deny connections based on originating
telephone number.
<HR>
</DL>
<P>If you have a voice-capable modem, then you can use <TT>vgetty</TT>. The <TT>vgetty</TT>
program is an extension to <TT>mgetty</TT> that provides additional call-handling
capabilities. When the modem reports an incoming call, <TT>vgetty</TT> has the modem
pick up the line and play a greeting. Then, as with <TT>mgetty</TT>, the modem reports
the type of call. If it hears "human voices" (stuff it can't identify),
the modem reports a voice connection and <TT>vgetty</TT> records the noise as an
incoming voice message. If the modem reports that it identifies a fax tone, <TT>vgetty</TT>
acts like <TT>mgetty</TT> and receives a fax or answers a poll. If instead, the modem
hears nothing following the greeting (a certain level of silence that continues for
a certain number of seconds), the modem assumes the caller is a data modem and attempts
a data connection.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading31<FONT COLOR="#000077"><B>TIP: </B></FONT>Do not use <TT>vgetty</TT>
if you expect a large number of voice calls and very few data calls on the phone
line you hook up. Most modems will hang up during the incoming message.
<HR>
</DL>
<P>Basically the <TT>sendfax</TT> portion does the following:
<UL>
<LI>Sends faxes directly or using shell scripts.
<P>
<LI>Does fax polling. The <TT>polling</TT> means that you can call another fax machine
and request data from it.
<P>
<LI>Creates a fax queue. Outgoing faxes get sent automatically, and the user is informed
by mail about the result.
</UL>
<P>You will need the Portable Bitmap Toolkit (<TT>pbmplus</TT>) for converting from
the standard G3 fax format to printable images. The reason is that <TT>mgetty</TT>
itself can only send or receive G3 (raster) format. However, the distribution includes
tools to convert raw G3 files to or from the format used by <TT>pbmplus</TT>. The
<TT>pbmplus</TT> toolkit is available from <TT>tsx-11</TT> or <TT>sunsite</TT> archives.
You will have to use the <TT>pbmtog3</TT> and <TT>g3topbm</TT> utilities in <TT>mgetty</TT>
to convert between PBM and G3. Also, the Ghostscript interpreter can convert PostScript
to G3, but not vice versa.</P>
<P>To compile the package, copy the <TT>policy.h-dist</TT> over to the <TT>policy.h</TT>
file. Then run <TT>make all</TT> to make all the packages.</P>
<P>To enable logins with fax capability, replace the <TT>getty</TT> with <TT>mgetty</TT>
(or <TT>vgetty</TT> if your modem can handle voice) for the <TT>/dev/tty</TT> device
you have configured for incoming calls. To send faxes, you have to use <TT>sendfax</TT>.
This is the syntax for the command:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF"> sendfax [-p] [-xdebuglevel] [-v] [-lmodemlines]
[-minitstring]] [-dpolldirectory] [-Cmodemclass] [-S]
[-n] phone-number [g3file]
</FONT></PRE>
<UL>
<P>Now that we have discussed all these options, you may be happy to know that none
of these options are required to send a fax. So the following commmand by itself
will send out a fax:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">$ sendfax 5551212 sample.g3
</FONT></PRE>
The command will send the G3 encoded file fax to the number 5551212. For sending
graphic images in the popular PBM format, you can also pipe the output of the <TT>pbm2g3</TT>
command to <TT>sendfax</TT>:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">$ pbm2g3 sample.pbm | sendfax 555-1212
</FONT></PRE>
<H4 ALIGN="CENTER"><A NAME="Heading32<FONT COLOR="#000077">The Sticky Copyright
Issue</FONT></H4>
From the FAQ, the note about copyrights is as follows:
<P>"The <TT>mgetty</TT>+<TT>sendfax</TT> package is Copyright <SUP>"</SUP>1993
Gert Doering. You are permitted to do anything you want with this program--redistribute
it, use parts of the code in your own programs--but you have to give me credit--do
not remove my name.</P>
<P>"If the program works for you, and you want to honour my efforts, you are
invited to donate as much as you want.</P>
<P>"If you make money with <TT>mgetty</TT>, I want a share. What I mean by that
is: It's perfectly OK with me to get paid for <TT>mgetty</TT> installation or support,
but if you want to actually sell <TT>mgetty</TT>, or pack <TT>mgetty</TT> with a
modem and sell it as `UNIX FAX package,' contact me first."
<DL>
<DT></DT>
</DL>
</UL>
<DL>
<DD>
<HR>
<A NAME="Heading33<FONT COLOR="#000077"><B>WARNING:</B> </FONT>This package
is still BETA software. Use it at your own risk; there is NO warranty. If it erases
all the data on your hard disk, damages your hardware, or kills your dog, that is
entirely your problem. Anyway, the program works for me and quite a lot of other
people. For more info on the copyright issue, please contact Mr. Doering directly.
<HR>
<H4 ALIGN="CENTER"><A NAME="Heading34<FONT COLOR="#000077">Troubleshooting
the Modems</FONT></H4>
The FAQ has some interesting questions and answers to the commonly found bugs, "features,"
and fixes. In most cases, if your modem is not supported, twiddling with a few files
here or there will not do the trick. I tried four different types of known name-brand
modems before a cheap clone modem worked. I have no idea why this modem, which by
the way has no visible markings, worked, whereas the others did not. You may have
better luck than I did.
<P>In short, trying to fax out of Linux may not be as easy as you think. It's possible,
but will take time and effort on your part.
<H3 ALIGN="CENTER"><A NAME="Heading35<FONT COLOR="#000077">Summary</FONT></H3>
This is a brief introduction to HylaFAX, a complete fax-handling package for UNIX
and Linux. I covered the following items in this chapter.
</DL>
<UL>
<LI>How to get HylaFAX for your machine.
<P>
<LI>HylaFAX installation involves un<TT>tar</TT>ring the source files in a local
directory. Then it's a matter of running <TT>configure</TT> to customize the program
for your machine and running <TT>make install</TT>. You have to be <TT>root</TT>
to install HylaFAX.
<P>
<LI>How to check the <TT>MODEMS</TT> file to see whether your modem is supported.
<P>
<LI>HylaFAX requires a background daemon <TT>faxd</TT> to handle incoming and outgoing
faxes. You have to start the daemon with the <TT>-m</TT> option to specify where
your modem exists. You need a FIFO and daemon for each modem on your system.
<P>
<LI>The sendfax program requires the Adobe Font Metric files (in <TT>/usr/local/lib/afm</TT>)
for converting from text to fax.
<P>
<LI>Install Ghostscript before you install the HylaFAX package. This saves you a
lot of time and gets rid of most installation problems.
<P>
<LI>How to check the status of received or sent faxes with the <TT>faxstat</TT> program.
<P>
<LI>The fax daemon, <TT>faxd</TT>, can be configured to answer either data or fax
transmissions if <TT>faxd</TT> is invoked with the <TT>-g</TT> argument.
<P>
<LI>HylaFAX supports polling via fax machines.
<P>
<LI>How to get more information about HylaFAX via the WWW by accessing the Web page
<TT>http://www.vix.com/HylaFAX</TT>.
<P>
<LI>The source code for HylaFAX is available for public FTP on <TT>ftp.sgi.com</TT>
as <TT>/sgi/fax/source/ hylaFAX-v4.0pl1-tar.gz</TT>.
<P>I have also introduced you to <TT>sendfax</TT>, <TT>mgetty</TT>, and <TT>vgetty</TT>.
These three programs enable you to send faxes, receive faxes, and even set up voice
mail on your Linux box, provided your modem is supported.
</UL>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -