📄 todo
字号:
Here's a blueprint for v2.0 of the Qfax suite, submitted to the listfor your comments and feedback. Much of what's proposed here hasalready been done, but if you can think of additions or improvementsthen by all means speak up before I do something rash and release thenext version :)(1) More Security:The efax fax script is replaced by a cluster of binaries that use efaxin various ways. This makes the system less prone to script-hacking,and more modular, letting you install certain utilities for the use ofroot and/or FaxMaster only, while others can be used by all users.Qfax will no longer rely on environment variables to determine theuser's login name or home directory; this information will be lookedup with the appropriate library routines such as getlogin() andgetpwnam().None of the binaries in the Qfax suite will need to be setuid root.The highest level of permission required is that of uucp, in order towrite and remove lock files, and checking for (uid == euid) isimplemented when this is necessary.(2) Remote Access via Networking:As some of you requested, Qfax will now support connections fromremote machines via TCP. The Qfax daemon (qfaxd) will sit at port4560 (port number is configurable) on the host with the fax-modem andawait client connections from qfax or qsend on remote machines or thelocal host.Client operations include sending faxes, retrieving faxes from the faxspool, viewing the incoming and outgoing fax queues, and removingqueued jobs. Features such as fax viewing and printing remain localoperations, however, as they should be.Access is restricted by qfaxd, which looks up the client user'saddress in an authorization database (fax.auth) before offering anyfax services.(3) Remote Access by Email:For those remote users who can't use TCP networking to send faxes,Qfax will also support a fax-by-e-mail mechanism. By sending mail to"fax@your.site.domain" with the appropriate fax information containedin X-Fax-* headers, users can send faxes from any e-mail-equippedhost. Naturally, Qfax looks up the requestor's address in theauthorization database (fax.auth) before granting any fax services.(4) Fax-by-Number Support:Also by request (thanks Giuseppe Zanetti), Qfax will now understande-mail addresses of the form "user@555-1212.fax" for those occasionswhen you want to fax someone who isn't in your fax phonebook and don'tfeel they're worth adding. In this case, Qfax relies on the rest ofthe cover page information being supplied through X-Fax-* headers inthe body of the message; otherwise default or blank entries are inserted.(5) Fax Priority and Restriction:The fax authorization file (fax.auth) allows you to list the users youwant to allow to send faxes, and to assign each of them a basepriority [0-10]. A priority of 0 (or no matching entry) means theuser cannot send faxes at all. Priorities 1-10 allow local phonecalls only, while 11-20 allow long-distance faxes as well.User addresses can be specified with wildcards ("generalized regularexpressions," for the technically-inclined), so you can essentiallycreate permission "masks" such as: .*@.*\.mycompany\.com 5which would grant any user on any host at mycompany.com a basepriority of 5 (local calls only).The priority system does more than just allow/deny services. Theuser's base priority gets multiplied by the fax priority he sets inthe X-Fax-Priority header of his fax to determine the final priorityof that fax. This determines the order in which faxes get sent out.The priority levels I have in mind at the moment are: Nice 1 Normal (default) 5 Rush 10 Urgent 100Thus, if your personal priority is 5 and you want to send a "Rush" faxto someone, the priority of your fax would be 50.The idea behind these definitions is to better manage systemresources. While "Normal" implies "send when you can," "Nice" implies"send when it's convenient for you" (i.e. when load levels are below acertain value, when phone rates are lowest, etc.). "Rush" implies"send as soon as practical," and "Urgent" implies "send it now!"Urgent faxes will be sent out immediately if possible, IF the fax'stotal priority is 500 or greater; this allows you to restrict thisimmediate-send feature to users with a basic priority of 5 or more.(6) X-Fax-* Headers:You can now supply virtually all cover page information throughspecialized e-mail headers, which can override any defaults from yourphonebooks. In fact, if you're using fax-by-number or fax-by-e-mailyou HAVE to supply some of the missing cover page information withthese headers. These include: X-Fax-To: X-Fax-Attn: X-Fax-To-Phone: X-Fax-To-Fax: X-Fax-From-Phone: X-Fax-From-Email: X-Fax-Comment-Start: X-Fax-Comment-End: X-Fax-Priority: X-Fax-Attach:You cannot supply different "From:" or "From Company:" information,however, as a security feature. "From Company:" information should beset centrally on the host where the fax-modem is installed, and"From:" should be provided directly by the user's host. You can,however, supply a different return address with "X-Fax-From-Email" tohave recipients respond to a different e-mail address, and similarlyyou can change the return phone number "X-Fax-From-Phone". You cannotalter the return fax number, however, since by law (at least in NorthAmerica) this must be the phone number of the sending fax machine. Ifyou need to direct the recipient to a different fax number, the"X-Fax-Comment-*" section should suffice.(7) Attachments and MIME Support:Qfax will now support attachments of two varieties--its own internalattachment format, and MIME/Metamail attachments.By supplying a comma-separated list of files with the "X-Fax-Attach"header, you can have Qfax include other text or graphics files at theend of your faxes. Qfax is GIF-, JPEG-, and DVI-aware at the moment,but through a user-customizable mailcap-like file (qattach.rc) you canspecify which programs should be invoked to convert files withparticular extensions into G3 faxes. This attachment system,incidentally, will work remotely as well--the files for attachment areattached on the local host BEFORE sending the fax to qfaxd.For those of you who use MIME/Metamail, your existing mailcap filecan be used for this purpose. Thanks to Andrew Daviel(advax@triumf.ca) for making me Metamail-literate and for developingthe Metafax patch for Qfax. Basically, if your mailer supportsMIME/Metamail extensions, you already have the ability to incorporateattachments such as graphics files; Qfax now knows how to parse thismail format and make a multi-part fax out of it.Naturally, you can't send audio or video files by fax (it would bepointless to send a uuencoded file by fax :), so you'll be mailed anasty message by Qfax if you try :)(8) Auto-Configuration:The efax fax script contains a lot of obscure modem configurationcommands that generally require a bit of tweaking before you get thewhole thing working properly. The "fax test" option is a gooddiagnostic, but you still need to be able to understand its output tomake the configuration changes by hand. Qfax will now offer you autility which can figure out what commands your modem will and willnot support, and can make the necessary configuration changes for you.You can still do everything by hand if you like, but for those whoseem to be having trouble getting everything configured, this may be avalued addition.(9) Address Look-Ups for Received Faxes:When a fax is received, Qfax will now try to identify the sender bylooking up the sender's station identifier in the central phonebook(fax.db). If it finds a matching entry, the sender's company namewill be used to identify the fax a bit more clearly. In other words,instead of sending FaxMaster a note saying "I received a fax," thenote might read "I received a fax from ACME Corp." If it can't find amatching entry, the note will read "I received a fax from +6045551212"or whatever the station identifier string happened to be. If thestation identifier is empty (null), the note will read "I received afax from an unknown sender."(10) Debugging Features:There will also be more debugging support in v2.0, since a number ofyou were having a hard time figuring out what was wrong, and whereQfax was failing. By invoking qfaxd and qfax with a debugging flagsuch as "-xn" where n is a debug level from 0 through 9, you can havethese programs log significant events and error messages to a file.(11) Bug Fixes:Qfax now understands that the "From:" and "To:" fields in a mailheader can be written several ways (thanks again to Andrew Daviel forpointing this out and doing a little header research :). It's nowmuch more flexible in interpreting these fields. Since mailers likeSendmail allow you to customize the format of your mail headers,there's no way Qfax can be expected to handle EVERY conceivableformat, but it will correctly interpret the following: user@domain <user@domain> user@domain (Full Name) user@domain <Full Name> Full Name (user@domain) Full Name <user@domain> "Full Name" (user@domain) "Full Name" <user@domain> "Full Name, Other Information, ..." (user@domain) "Full Name, Other Information, ..." <user@domain>Only outgoing headers matter to Qfax, since it doesn't receive faxesas e-mail, so generally you have control over the format your maileruses to write the "To:" and "From:" headers in your outgoing mail(have a look at your sendmail.cf file, for example). I'm not going tohave a lot of sympathy, then, for those who can't get Qfax to workwith their esoteric header formats; there's only so far Qfax can beexpected to bend in the name of accommodation. I WILL provide a shorttutorial on how to modify your sendmail.cf file to write headers in areasonably "standard" format that Qfax understands, however.As you can imagine, Qfax 2.0 is a very different beast than itspredecessor, so I will not be shipping patches for 1.x. Likewise, thefax.rc files you now have will become obsolete, replaced by a numberof more specific and modular config files.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -