⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rhl59.htm

📁 linux的初学电子书
💻 HTM
📖 第 1 页 / 共 4 页
字号:

<BR>

<BR>

<A NAME="E68E460"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Another Fax Solution</B></FONT></CENTER></H3>

<BR>

<P>The mgetty+sendfax+vgetty 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 mgetty+sendfax-0.98.tar.gz, and you can get it from tsx-11.mit.edu in the 
/pub/linux/sources/sbin directory. There are three parts to this package: sendfax, vgetty, and mgetty. The program mgetty is for receiving faxes and handling external logins without killing any outgoing calls. sendfax is a program that sends fax files. 
vgetty is an extended version of mgetty that can answer the telephone like an answering machine and record voice-mail messages in addition to mgetty's fax or data call handling capabilities. The entire package lets you manage faxes and voice messages.

<BR>

<P>So what's the difference between mgetty and the regular versions of getty? Unlike traditional versions of getty or uugetty, which will put a modem into auto-answer mode, mgetty does not. When a call comes in, mgetty tells the modem to answer and tell 
mgetty what kind of call is being received. If it is fax, mgetty will receive the fax itself. If the modem is getting data, mgetty prompts for a user ID, and then hands the open line off to login for a normal data login.

<BR>

<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 do this, there is no way for mgetty to do this for you. mgetty 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 mgetty to allow for uucp and other connections.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Note that mgetty also supports caller ID and can be programmed to deny connections based on originating telephone number.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>If you have a voice-capable modem, then you can use vgetty. The vgetty program is an extension to mgetty that provides additional call-handling capabilities. When the modem reports an incoming call, vgetty has the modem pick up the line and play a 
greeting. Then, as with mgetty, the modem reports the type of call. If it hears &quot;human voices&quot; (stuff it can't identify), the modem reports a voice connection and vgetty records the noise as an incoming voice message. If the modem reports that it 
identifies a fax tone, vgetty acts like mgetty 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.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Do not use vgetty 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.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>Basically the sendfax portion does the following:

<BR>

<UL>

<LI>Send faxes directly or using shell scripts.

<BR>

<BR>

<LI>Do fax polling. The polling means that you can call another fax machine and request data from it.

<BR>

<BR>

<LI>Create a fax queue: outgoing faxes get sent automatically, and the user is informed by mail about the result.

<BR>

<BR>

</UL>

<P>You will need the Portable Bitmap Toolkit (pbmplus) for converting from the standard G3 fax format to printable images. The reason is that mgetty 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 pbmplus. The pbmplus toolkit is available from tsx-11 or sunsite archives. You will have to use the pbmtog3 and g3topbm utilities in mgetty to convert between PBM and G3. Also, the Ghostscript interpreter can convert 
PostScript to G3, but not vice versa.

<BR>

<P>To compile the package, copy the policy.h-dist over to the policy.h file. Then run make all to make all the packages.

<BR>

<P>To enable logins with fax capability, replace the getty with mgetty (or vgetty if your modem can handle voice) for the /dev/tty device you have configured for incoming calls. To send faxes, you have to use sendfax. The syntax for the command is:

<BR>

<PRE>

<FONT COLOR="#000080">sendfax [-p] [-xdebuglevel] [-v] [-lmodemlines]

 [-minitstring]] [-dpolldirectory] [-Cmodemclass] [-S]

 [-n] phone-number [g3file]</FONT></PRE>

<P>The options for this command are as follows:

<BR>



<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-p

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Tells sendfax to try fax polling, that is, get any documents queued in the remote fax machine for you.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-x 

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Uses the given level of verbosity for logging&#151;0 means no logging, 5 is really noisy.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-v

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Gives some progress report on stdout.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-l

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Uses the given modem lines. Multiple lines can be separated by a colon. Example: sendfax -l tty1a:tty2a</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-m

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Sends an additional init string. This string is sent right after initializing the modem and setting it into Class 2 mode. You can use this to set the speaker value, some special registers, and so on.

<BR>The modem must return &quot;OK.&quot; If it returns &quot;ERROR,&quot; sendfax prints an error message and aborts. You do not have to prepend the &quot;AT&quot; prefix, but it won't do any harm either.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-d

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Specifies the directory where polled fax files should go to. Defaults to the directory from which the program was invoked for the current directory. Unused if not polling a fax.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-C

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

The values for class are the type of modem: &quot;auto&quot; (the default), or &quot;cls2.&quot;</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-S

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Assumes modem connection on stdin, do not try to lock or initialize anything. To take over existing connections use with a dial string of T1. The T1 command sends out a short beep and no phone number at all. Such a behavior would confuse many modems. In 
the case of a pulse dialed number, this action may confuse the telco switch. You may also use the -m ATX1 option with the -S option if you do not wait for dial tone.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-n

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Tells sendfax to send the fax pages in &quot;normal&quot; (204&#180;98 dpi) mode. Default is &quot;fine&quot; mode (204&#180;196 dpi).</FONT>

</TABLE><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 command by itself will send out a fax:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">$ sendfax 5551212 sample.g3</FONT></PRE>

<P>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 pbm2g3 command to sendfax:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">$ pbm2g3 sample.pbm | sendfax 555-1212</FONT></PRE>

<BR>

<A NAME="E69E599"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>The Sticky Copyright Issue</B></FONT></CENTER></H4>

<BR>

<P>From the FAQ, the note about the copyright is as follows:

<BR>

<P>&quot;The mgetty+sendfax package is Copyright &quot; 1993 Gert Doering. You are permitted to do anything you want with this program&#151;redistribute it, use parts of the code in your own programs, _, but you have to give me credit&#151;do not remove my 
name.

<BR>

<P>&quot;If the program works for you, and you want to honour my efforts, you are invited to donate as much as you want.

<BR>

<P>&quot;If you make money with mgetty, I want a share. What I mean by that is: it's perfectly OK with me to get paid for mgetty installation or support, but if you want to actually sell mgetty, or pack mgetty with a modem and sell it as &quot;UNIX FAX 
package,&quot; contact me first.&quot;

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>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.

<BR>For more info on the copyright issue, please contact Mr. Doering directly.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E69E600"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Troubleshooting the Modems</B></FONT></CENTER></H4>

<BR>

<P>The FAQ has some interesting questions and answers to the commonly found bugs, &quot;features,&quot; 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.

<BR>

<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.

<BR>

<BR>

<A NAME="E68E461"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Summary</B></FONT></CENTER></H3>

<BR>

<P>This is a brief introduction to HylaFAX, a complete fax-handling package for UNIX and Linux. I covered the following items in this chapter.

<BR>

<UL>

<LI>How to get HylaFAX for your machine.

<BR>

<BR>

<LI>HylaFAX installation involves untarring the source files in a local directory. Then it's a matter of running configure to customize the program for your machine and running make install. You have to be root to install HylaFAX.

<BR>

<BR>

<LI>How to check the MODEMS file to see whether your modem is supported.

<BR>

<BR>

<LI>HylaFAX requires a background daemon faxd to handle incoming and outgoing faxes. You have to start the daemon with the -m option to specify where your modem exists. You need a FIFO and daemon for each modem on your system.

<BR>

<BR>

<LI>The sendfax program requires the Adobe Font Metric files (in /usr/local/lib/afm) for converting from text to fax.

<BR>

<BR>

<LI>Install Ghostscript before you install the HylaFAX package. This saves you a lot of time and gets rid of most installation problems.

<BR>

<BR>

<LI>How to check the status of received or sent faxes with the faxstat program.

<BR>

<BR>

<LI>The fax daemon, faxd, can be configured to answer either data or fax transmissions if faxd is invoked with the -g argument.

<BR>

<BR>

<LI>HylaFAX supports polling via fax machines.

<BR>

<BR>

<LI>How to get more information about HylaFAX via the WWW by accessing the Web page http://www.vix.com/hylafax.

<BR>

<BR>

</UL>

<P>The source code for HylaFAX is available for public FTP on <A HREF="tppmsgs/msgs1.htm#177" tppabs="ftp://<a name=/"I2"></A>ftp.sgi.com">ftp.sgi.com</A> as /sgi/fax/source/ hylaFAX-v3.0.pl0-tar.gz.

<BR>

<P>I have also introduced you to sendfax, mgetty, and vgetty. 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.

<P ALIGN=LEFT>

<A HREF="rhl58.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl58.htm" TARGET="_self"><IMG SRC="purprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>

<A HREF="#I0" TARGET="_self"><IMG SRC="purtop.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtop.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Page Top"></A>

<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm" TARGET="_self"><IMG SRC="purtoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>

<A HREF="rhl60.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl60.htm" TARGET="_self"><IMG SRC="purnext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>


</BODY></HTML>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -