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

📄 install

📁 使用efax的fax工具程序
💻
📖 第 1 页 / 共 2 页
字号:
INSTALLATION (Qfax 1.3):Installing the Qfax utilities is not exactly a trivial process.  Itinvolves numerous steps which should be followed carefully, so don'texpect to get this up and running properly in much less than half anhour.  I suggest printing out this file and going through the processwith the printout in hand, to ensure that nothing gets left out ormistyped.NOTE: This version of Qfax includes the patched sources for efax 0.7a.i.e. NO PATCHING OF EFAX IS NECESSARY.  If you want to find the virgin0.7a sources for efax, they can be found at available fromsunsite.unc.edu and its mirrors as /pub/Linux/apps/comm/fax/efax07a.tar.gz.<<< 1. Create a fax user >>>Efax has to be able to read and write UUCP-style lock files.  Withtraditional efax this is not a problem because it's typically run byroot, but in a multi-user environment where efax is used as a serverit needs to have a designated userid with appropriate permissions.Making it setuid root would work, but gives it far more permissionthan it really needs, presenting a possible security hole.  A bettersolution is to make it setuid uucp.To do this, first make certain you have a uucp UID in your /etc/passwdfile.  You should have a line something like:	uucp:*:5:7:Fax/UUCP Agent:/usr/lib/uucp:/bin/falseIn this example, the uucp user has a UID of 5 and a GID of 7, butthese numbers may well be different on your machine.Now edit your /etc/passwd file and add a line AFTER the uucp entry,defining a fax user to have the same UID as uucp, and GID uucp:	fax:*:5:7:Fax Agent:/usr/spool/fax:/bin/falseNote that this last step is just cosmetic; as far as Linux isconcerned users fax and uucp are synonymous.  The advantage to doingthis is readability in scripts and such.<<<  2. Create a mail alias for FaxMaster  >>>Since you're now thinking of using efax as a server, efax has to sendits messages to a designated "FaxMaster", in the same way that mailprograms direct messages to a "postmaster".  To do this, edit yourmail aliases file, wherever it happens to be.  Some likely places youmight find it are "/usr/local/lib/smail/aliases", "/usr/lib/aliases",or "/etc/aliases".  Depending on your setup it may be in a differentplace.Simply append a line such as:	FaxMaster: rootto have all mail to the FaxMaster directed to root, or 	FaxMaster: some-user-nameto have it sent to "some-user-name".When you're done, run newaliases (or mkaliases) to have your mailerreconstruct the mail alias database.<<<  3. Create an e-mail-to-fax gateway  >>>Your mailer now has to be told how to read addresses of the form"person@company.fax" and redirect these letters to Qfax instead oftrying to mail them.  The exact procedure varies depending on whetheryou use sendmail or smail as your mailer.  [ These redirections arebased on the mailfax shell scripts by Rick Lyons. ]IMPORTANT NOTE: This version of Qfax doesn't understand multi-partMIME mail (i.e. mail with attachments).  This is because the waymulti-part headers are written confuses Qfax.  If you use aMIME-capable mailer (e.g. pine, Eudora, etc.), be sure not to includeany attachments if you intend to use the mail-to-fax gateway.****** If you use sendmail (8.6.x):The first thing you'll have to do is make a couple of minor changes toyour /etc/sendmail.cf file.As you're doubtless aware if you've poked around in a sendmail.cffile, there are two things you have to add to create an e-mail-to-faxgateway: an address-rewriting rule that catches all addresses of theform user@company.fax, and a mailer definition that sends this mail toQfax.  Depending on your setup (i.e. whether you use a nameserver ornot) you may also need to prevent Sendmail from trying to resolve*.fax addresses via DNS.  Lastly, if you're using Qfax v1.x, you mayneed to make a change to the way Sendmail writes its headers.  I'lloutline the necessary additions one at a time, below. *** Step 1 : The Address Rewriting Rule ***You should place the following lines immediately after the "$#error"definitions in Ruleset 0:# forward fax messages to Qfax softwareR$+ < @ $+ . fax >	$#fax $@ $2 $: $1	user@company.faxNote that there are two tabs in this line--one between '>' and"$#fax", the other between "$1" and "user".  You cannot simply usespaces here, since Sendmail is looking for tabs as field delimiters.Here's the relevant portion of my sendmail.cf file for context:#########################################   Ruleset 0 -- Parse Address   #########################################S0R<@>			$#local $: <>			special case error msgsR$* : $* ;		$#error $@ USAGE $: "list:; syntax illegal for recipient addresses"R<@ $+>			$#error $@ USAGE $: "user address required"R<$* : $* >		$#error $@ USAGE $: "colon illegal in host name part"# forward fax messages to Qfax softwareR$+ < @ $+ . fax >	$#fax $@ $2 $: $1	user@company.fax# handle numeric address specR$* < @ [ $+ ] > $*	$: $>98 $1 < @ [ $2 ] > $3	numeric internet specR$* < @ [ $+ ] > $*	$#smtp $@ [$2] $: $1 < @ [$2] > $3	still numeric: send*** Step 2: The Mailer definition ***The mailer definition for Qfax resembles the definition for programs(Mprog), and simply outputs the mail to Qfax.  Add the following lineat the end of your "Local and Program Mailer" definitions:Mfax,		P=/usr/local/bin/qfax, F=lsDFheu, S=14, R=24, M=100000,		A=qfax $uOf course, if you've installed qfax somewhere other than/usr/local/bin, be sure to set the appropriate (full) path instead.Once again, for context, here's the appropriate section of mysendmail.cf file:#####################################################   Local and Program Mailer specification   ##########################################################  @(#)local.m4	8.6 (Berkeley) 10/24/93  #####Mlocal,		P=/usr/bin/procmail, F=lsDFMShP, S=10, R=20/40,		A=procmail -d $uMprog,		P=/bin/sh, F=lsDFMeu, S=10, R=20/40, D=$z:/,		A=sh -c $uMfax,		P=/usr/local/bin/qfax, F=lsDFheu, S=14, R=24, M=100000,		A=qfax $u*** Step 3: Bypassing Name Service ***Obviously the top-level domain ".fax" doesn't exist, so if you allowSendmail to try to resolve these addresses with a name server you'llfind that it hangs indefinitely in the mail queue.  If this happens toyou, the solution is to find the line in your sendmail.cf file (underRuleset 96) which looks like this:# pass to name server to make hostname canonicalR$* < @ $* $~P > $*		$: $1 < @ $[ $2 $3 $] > $4Comment out this line (by putting a '#' in front of the 'R' line) andthis should bypass the name server.  This is generally harmless to doin any case, since by this point the address is almost alwayscanonical anyway.*********** If you use smail:If you do not have a "/usr/local/lib/smail/transports" file, createone.  Now add the following line to it:	fax: driver=pipe, local; user=fax, cmd="/usr/local/bin/qfax"If you do not have a "/usr/local/lib/smail/routers" file, create one.Add the following line to it:	fax: driver=queryprogram, transport=fax;	     cmd="/usr/bin/expr ${lc:host} : '.*\.fax$'"NOTE: If the "${lc:host}" expression doesn't evaluate properly withyour shell, try using "${lc:-$host}" instead, as in:	fax: driver=queryprogram, transport=fax;	     cmd="/usr/bin/expr ${lc:-$host} : '.*\.fax$'"If you did not already have a routers file, you must also include thedefault routing info:	inet_addrs: driver=gethostbyaddr, transport=smtp;		    fail_if_error, check_for_local,	inet_hosts: driver=gethostbyname, transport=smtp;		    -required, -domain, -only_local_domain,	paths: driver=pathalias, transport=uux; file=paths,		      proto=bsearch, optional, -required, domain=uucp,	uucp_neighbors: driver=uuname, transport=uux;			cmd=/usr/bin/uuname, domain=uucp,	smart_host: driver=smarthost, transport=uux; -path,<<<  4. Create a spool directory for faxes >>>You'll need to designate a place to store incoming and outgoing faxesin the same way that mail and news programs need a spool area.  Irecommend making a "/usr/spool/fax" directory, and within that, createthese directories (use "chown uucp.uucp <directory>" to make sure Qfaxand efax can read and write to them):	/usr/spool/fax/recvqThis is where incoming faxes will be stored, along with their logfiles, to be dealt with by the FaxMaster.  If you want all users to beable to read incoming faxes, you should use chmod to set thepermissions on this directory to 775, otherwise set it to 770.	/usr/spool/fax/sendqThis is where outgoing faxes will be stored while they wait to be sentout.  Qrun will look in here for faxes to send.  Its mode should beset to 770.	/usr/spool/fax/docqThis is a storage directory for inactive faxes.  Qrun uses it to storefaxes which it couldn't send properly, but you can also use ityourself to store faxes indefinitely.  This directory should beaccessible to all, i.e. mode 755.	/usr/spool/fax/logThis is where all send logs are written.  Generally, this is privateto the FaxMaster, and should be set to mode 770.	/usr/spool/fax/resultThis is a directory used to store the result of the most recent faxoperation.  The efax program writes its result code here, which Qrunuses to determine whether an outgoing fax succeeded or not.  It shouldbe set to mode 770.Note that if you don't choose to use the directories I've specifiedabove, you'll have to make changes in step 7 to config.h, where thesedirectories are defined.

⌨️ 快捷键说明

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