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

📄 efax.1

📁 efax传真软件源代码
💻 1
📖 第 1 页 / 共 3 页
字号:
.ft CWefax -d /dev/cua1  -j '+FAA=1' \\   -x /usr/spool/uucp/LCK..cua1 \\   -x /usr/spool/uucp/LCK..ttyS1 \\   -g "exec /sbin/getty -h /dev/cua1 %d" \\   -iS0=2 -w -s \\   -r "/usr/spool/fax/incoming/%b%d-%H.%I.%S" \\   >> /usr/spool/fax/faxlog.cua1 2>&1.ft P.fi.LPNote that adaptive answer of either type will not work for allcallers.  For some data calls the duration of the initialdata-mode answer may be too short for data handshaking tocomplete.  In other cases this duration may be so long thatincoming fax calls will time out before efax switches to faxmode.  In addition, some calling fax modems mistake data-modeanswering tones for fax signaling tones and initiate faxnegotiation too soon.  If you use software adaptive answer youcan reduce the value of the initial data-mode answer (set byTO_DATAF in efax.c) to get more reliable fax handshaking orincrease it for more reliable data handshaking.  However, if youneed to provide reliable fax and data service to all callers youshould use separate phone numbers for the two types of calls.When a call is answered the modem goes on-line with thecomputer-to-modem baud rate fixed at the speed used for the mostrecent AT command.  When efax is waiting for a fax or data callit sets the interface speed to 19200 bps since this is the speedrequired for fax operation.  This prevents full use of 28.8kbpsmodem capabilities..SH USING INIT TO RUN EFAXefax can answer all incoming calls if you place an entry for efaxin \fB/etc/inittab\fP (for SysV-like systems) or\fB/etc/ttytab\fP (for BSD-like systems). The \fBinit\fP(8)process will run a new copy of efax when the system boots up andwhenever the previous efax process terminates.  The inittab orttytab entry should invoke efax by running the \fBfax\fP scriptwith an \fBanswer\fP argument.For example, placing the following line in \fB/etc/inittab\fP(and running "kill -1 1") will make init run the \fBfax\fP scriptwith the argument \fBanswer\fP every time previous processterminates and \fBinit\fP is in runlevel 4 or 5..IP.nf.ft CWs1:45:respawn:/bin/sh /usr/bin/fax answer.ft P.fi.LPFor BSD-like systems (e.g. SunOS), a line such as the followingin \fB/etc/ttytab\fP will have the same effect:.IP.nf.ft CWttya "/usr/local/bin/fax answer" unknown on.ft P.fi.LPYou should protect the fax script and configuration files againsttampering since init will execute them as a privileged (root)process.  If you will be allowing data calls via getty and loginyou should ensure that your system is reasonably secure(e.g. that all user id's have secure passwords).If efax exec()'s getty properly but you get a garbled loginprompt then there is probably a baud rate mismatch between themodem and the computer.  First, check the efax log file to makesure the modem's CONNECT response reported the serial port speed(e.g. 19200), \fBnot\fP the modem-modem speed (e.g. 14400).Next, check the getty options and/or configuration files(e.g. /etc/gettydefs) for that particular baud rate.  Then rungetty manually with the same arguments and verify the portsettings using ``stty </dev/XXX''.  Note that you'll probablywant to enable hardware flow control for data connections (-h foragetty, CRTSCTS for getty_ps).A few programs won't work properly when efax is set up to answercalls because they don't create lock files.  You can put theshell script ``wrapper'' below around such programs to make themwork properly.  Change BIN and LOCKF to suit..IP.nf.ft CW#!/bin/shBIN=/bin/badprogramLOCKF=/var/spool/uucp/LCK..cua1if [ -f $LOCKF ]then        echo lock file $LOCKF exists        exit 1else        printf "%10d\n" $$ >$LOCKF        $BIN $*        rm $LOCKFfi.ft P.fi.LP.SH DELIVERING RECEIVED FAXES BY E-MAILThe "fax answer" script described above can be configured toe-mail the fax files received by the previous fax answer processto a "fax manager" who can then forward the fax to the correctrecipient.  The received fax files are send as MIME attachments,one file per page, using the ``base64'' text encoding and the``image/tiff'' file format.To view the fax images directly from your e-mail reader you willhave to configure it with an application that can display filesof type image/tiff.  Typically this is specified in a ``mailcap''file.  For example, placing the following line in /etc/mailcapwill cause the fax file attachments to be displayed using the``fax view'' command..ft CWimage/tiff; fax view %s.ft P.SH SENDING FAXES USING THE PRINT SPOOLERYou can configure a "fax" printer into the lpr print spooler thatwill fax a document out using efax instead of printing it.  Thisallows a network server running efax to send faxes on behalf ofother machines, including non-Unix clients.  In the followingsteps use the directories specified in the fax script if they aredifferent than /usr/bin and /var/spool/fax (FAXDIR).  To set up afax printer do the following as root:(1) Create a link to the fax script called ``faxlpr'' so the faxscript can determine when it is being invoked from the printspooler:.ft CWln -s /usr/bin/fax /usr/bin/faxlpr.ft P(2) Edit /etc/printcap and add an entry such as:.IP.nf.ft CWfax:lp=/dev/null:sd=/var/spool/fax:if=/usr/bin/faxlpr:.ft P.fi.LPto define a printer called "fax".  Print files will be spooled tothe /var/spool/fax (sd=) directory and then piped to the/usr/bin/faxlpr filter (if=).  Error messages will appear on/dev/console.(3) Create and/or set the permissions to allow anyone to read andwrite in the fax spool directory.  For example:.IP.nf.ft CWmkdir /var/spool/faxchmod 777 /var/spool/fax.ft P.fi.LP(4) Create a printer daemon lock file that is readable by anyone:.IP.nf.ft CWtouch /var/spool/fax/lockchmod 644 /var/spool/fax/lock.ft P.fi.LPYou should now be able to send a fax using the lpr interface byusing a command such as:.IP.nf.ft CWlpr -P fax -J "555 1212" file.ps.ft P.fi.LPwhere the -J option is used to specify the phone number or aliasto be dialed.Note that if more than one file is given on the command line theywill be concatenated before being passed to "fax send".  TIFF-G3,Postscript or PBM files must therefore be sent one file at a timealthough TIFF and Postscript files may contain multiple pages.Only multiple \fItext\fP files can be sent in one command.  Pagebreaks in text files can be marked with form-feed characters.Files will be converted and sent at the default (high)resolution.You can use lpq(1) to check the fax queue, lprm(1) to remove faxjobs and lpc(8) to control the spooler.  In each case use the-Pfax option to specify the fax ``printer.'' A log file will bemailed to the user when the fax is sent.You should also be able to send a fax from any networked computerthat has lpr-compatible remote printing software and that allowsyou to set the job name (-J option) to an arbitrary string.  Suchsoftware is available for most computers.See the lpd(8) and printcap(5) man pages for information on theprint spooler and for restricting access by host name(/etc/host.lpd) or by user group (the `rg' printcap entry)..SH RESOLVING PROBLEMSDouble check the configuration setup in the first part of the faxscript, particularly the modem device name and the lock filenames.If efax hangs when trying to open the modem device (typically/dev/ttyX), the device is either already in use by anotherprocess (e.g. pppd) or it requires the carrier detect line to betrue before it can be opened.  Many systems define an alternatedevice name for the same physical device (typically cuaX) thatcan be opened even if carrier is not present or other programsare already using it.If responses to modem initialization commands are being lost orgenerated at random, another processes (e.g. getty or an efaxauto-answer process) may be trying to use the modem at the sametime.  Try running efax while this other program is running.  Ifefax does not report "/dev/ttyX locked or busy. waiting."  thenthe lock files names are not specified correctly.Attempt to send a fax. Check that the modem starts making thecalling signal (CNG, a 0.5 second beep every 3 seconds) as soonas it's finished dialing.  This shows the modem is in fax mode.You may need to set the SPKR variable to -iM2L3 to monitor thephone line to do this.Listen for the answering fax machine and check that it sends theanswer signal (CED, a 3 second beep) followed by "warbling"sounds (DIS frames) every 3 seconds.  If you hear a continuoussound (tones or noise) instead, then you've connected to a datamodem instead.Your modem should send back its own warble (DCS frame) inresponse to DIS immediately followed by 1.5 seconds of noise (achannel check).  If everything is OK, the receiving end will sendanother warble (CFR frame) and your modem will start to senddata.  If you have an external modem, check its LEDs.  If flowcontrol is working properly the modem's send data (SD) LED willturn off periodically while the fax data is sent.Check the message showing the line count and the average bit ratewhen the page transmission is done.  Low line counts (under 1000for a letter size image) or the warning "fax output bufferoverflow" while sending indicate that the image data format isincorrect. Check the file being sent using the "fax view"command.If you get the error message ``flow control did not work'' thenflow control was not active.  This usually results in a garbledtransmission and the receiving machine may reject the page, abortthe call, print a distorted or blank image and/or hang up.The warning "characters received while sending" or an <XOFF>character appearing after the transmission means that theoperating system ignored the modem's XOFF flow control character.Ensure that you are not running other programs such as getty orpppd at the same time as efax since they will turn off xon/xoffflow control.If you cannot get flow control to work properly then enable``virtual flow control'' with the \fB-of\fP option or hardwareflow control with the \fB-oh\fP option.Check that the remote machine confirms reception with a +FPTS:1response (Class 2) or an MCF frame (Class 1).For Class 2 modems, the error message "abnormal call termination(code \fInn\fP)" indicates that the modem detected an error andhung up.Many companies advertise services that will fax back informationon their products.  These can be useful for testing faxreception.The message "run length buffer overflow" when receiving indicatesan error with the image data format.  You may need to use the\fB-or\fP option with certain Class 2 modems.If efax displays the message "can't happen (<details>)" pleasesend a bug report to the author.Finally, don't play "option bingo," if you can't resolve theproblem send a verbose log of the failed session (the output from\fBfax -v ...\fP) to the address below..SH WEB PAGEA Web Page with pointers to the latest version, known bugs andpatches is available at:.IP.ft CWhttp://casas.ee.ubc.ca/efax/.ft P.LP.SH RELATED SOFTWAREFor Linux SystemsIndependent packages provide more user-friendly interfaces toefax (xfax, tefax) and provide an e-mail-to-fax (Qfax) gatewayusing efax. All are available by anonymous FTP frommetalab.unc.edu in /pub/Linux/apps/serialcomm/fax/.For Amiga SystemsA port of an early version of efax for the Amiga is available asa component of a shareware voice mail package, AVM, distributedby Al Villarica (rvillari@cat.syr.edu).Other Portsefax is relatively easy to port.  All system-dependent code is in\fBefaxos.c\fP.  An early version of efax was ported to VMS.Version 0.8a was ported to Win32 by Luigi Capriotti.  Contact theauthor if you would like to integrate the Win32 code into thecurrent version..SH AUTHOREfax was written by Ed Casas.  Please send comments or bugreports to edc@cce.com..SH BUG REPORTSBug reports should include the operating system, the type of themodem and a copy of a verbose session log that demonstrates theproblem.  It's usually impossible to help without a verbose log.Please do \fBnot\fP send fax image files..SH COPYRIGHTefax is copyright 1993 -- 1999 Ed Casas.  It may be used, copiedand modified under the terms of the GNU Public License..SH DISCLAIMERAlthough \fBefax\fP has been tested it may have errors that willprevent it from working correctly on your system.  Some of theseerrors may cause serious problems including loss of data andinterruptions to telephone service..SH REFERENCESCCITT Recommendation T.30, "Procedures for Document FacsimileTransmission in the General Switched Telephone Network". 1988CCITT Recommendation T.4, "Standardization of Group 3 FacsimileApparatus for Document Transmission". 1988.For documentation on Class 1 and Class 2 fax commands asimplemented by Connexant (formerly Rockwell) modems seehttp://www.conexant.com/techinfo.For the TIFF specification seehttp://partners.adobe.com/supportservice/devrelations/PDFS/TN/TIFF6.pdfor RFC 2301 (ftp://ftp.isi.edu/in-notes/rfc2301.txt).For information on Ghostscript seehttp://www.cs.wisc.edu/~ghost/.The pbm utilities can be obtained by ftp from wuarchive.wustl.eduin /graphics/graphics/packages/NetPBM/netpbm-1mar1994.tar.gz.PCX and many other file formats are described in: Gunter Born,The File Formats Handbook, International Thomson Computer Press,1995.The "Fax Modem Source Book" by Andrew Margolis, published by JohnWiley & Sons in 1994 (ISBN 0471950726), is a book on writing faxapplications which includes source code.Dennis Bodson et. al., "FAX: Digital Facsimile Technology andApplications", Second Edition. Artech House, Boston. 1992..SH SEE ALSO.BR fax(1),.BR efix(1),.BR gs(1),.BR init(8), .BR inittab(5), .BR ttytab(5), .BR printcap(5),.BR lpd(8),.BR printf(3),.BR strftime(3)..SH  BUGSCan't read TIFF files with more than 1 stripClass 1 operation may fail if the program can't respond tocertain data received from the modem within 55 milliseconds.May fail if multitasking delays cause the received data tooverflow the computer's serial device buffer or if an under-runof transmit data exceeds 5 seconds.Polling does not work.Does not support 2-D coding, ECM, or BFT.

⌨️ 快捷键说明

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