Handbook:Server Operation:Tweaking and Customization
Open-source software is all about customization. So don't be surprised when most HylaFAX users consider customization a part of installation. In many cases some customization of the config files and the default coverpage will be necessary for desired HylaFAX functionality.
Contents
Modem Config Files
In the future, HylaFAX may be capable of "auto-configuring" most faxmodems. But currently, unless you're fortunate enough to be using a faxmodem that has been used by a HylaFAX developer or can find a functional config file from another HylaFAX user, then you will need to work on a config file for each of your faxmodems that you intend to use with HylaFAX. This can be done step-by-step during the faxaddmodem script, or as I prefer, a config file can be created prior to running faxaddmodem.
The config file contains all of the unique settings for a faxmodem. There are "default" settings built-into HylaFAX, but chances are good that all of these "defaults" are not appropriate or optimal for your particular faxmodem's make, model, or firmware revision. There are many possible differences between one faxmodem and another, and in order to properly create a config file you will need your faxmodem's AT and AT+F command set. These should be in the manual that [hopefully] came with your faxmodem.
Begin by using one of the following three "template" config files. If you do not know what class your faxmodem uses, then you can usually send it the 'AT+FCLASS=?
' command, and the faxmodem will
report the possible classes to use. You may see something like '0,1
', '0,1,1.0,2.0
', or '0,1,2,80
'. Class 0 is for data communication; Class 1, 1.0, 2, and 2.0 are fax protocols; and Class 80 is for voice communication. HylaFAX can utilize all of these classes, however, this document will only discuss faxing.
For Class 1 faxmodems, begin by using this file.
For Class 2 faxmodems, begin by using this file.
For Class 2.0 faxmodems, begin by using this file.
Start editing your config file by changing the '# $Id:
' line. At a minimum, change
the $Id name to something that identifies your config file and that is unique from all other config
files usually found in the /var/spool/hylafax/config directory. The $Id name should also be the filename used
for this config file. So, perhaps this line will appear as:
'# $Id: tweaking.html,v 1.28 2004/07/14 18:59:07 lhoward Exp $
'
Next, change the '# CONFIG:
' line to match your make, model, and intended flow control.
For Class 1, change ATI0
to match the result of 'ATI0
' and ATI3
to match the result of 'ATI3
'.
Replace the two 'name
's with anything to describe your modem.
For Class 2, change Manufacturer
to match the result of 'AT+FMFR?
' and Model
to match the result of 'AT+FMDL?
'.
For Class2.0, change Manufacturer
to match the result of 'AT+FMI?
' and Model
to match the result of 'AT+FMM?
'.
Replace flowcontrol
with your desired flow control method, 'NONE
', 'XONXOFF
' (software), or 'RTSCTS
' (hardware).
Now, proceed through the Modem* and Class* commands and replace the default value with the appropriate value for your modem. If your
desired values match the default values then that particular line may be removed (except for the *FillOrder and Class2AP* lines).
More description of each value is given in the hylafax-config(5F) man page.
When you have arrived at the bottom of the list, then save this config to a file named as your $Id name, and place it in the config directory (usually /var/spool/hylafax/config). Kill faxgetty if it is running. Now (re)run faxaddmodem. It should detect your modem appropriately by presenting you the config list rather than asking you for each setting. You now have a customized config file.
For more information please consult hylafax-config(5F) and faxaddmodem(8C).
Cover Page Customization
There are a few ways to customize a coverpage:
- make_faxcover is a simple sed script to munge an encapsulated postscript file, as created by tgif into the form required for a cover page for use with HylaFAX. Also included is a sample page as an example, before being run through the make_faxcover script. Read the README file for more information. Thanks to Thomas Erskine. Download and extract it from: ftp://ftp.sgi.com/sgi/fax/contrib/covers/makefaxcover.tar.Z. Note that because of changes in 4.1beta2 to the CommentX-commentsX faxcover variable, make_faxcover will not create comments sections appropriately. See Bug 81 for details.
- latex-cover from Rainer Krienke. latex-cover.sty offers a way to create custom coverpage templates for use with the faxcover application from the hylafax distribution. Download it at ftp://ftp.sgi.com/sgi/fax/contrib/covers/latex-cover-1.04.tar.gz. Read the README file for more information.
- You can manually follow the procedure used by make_faxcover with good success. First, you need to generate a simple Postscript or EPS document. In *NIXes you can use tgif. In Windows you can generate a simple Postscript document from any text editor such as Microsoft Word by configuring a new printer on the system using the Apple Laserwriter driver printing to a file. Make sure that in the driver properties under the "Postscript" options the EPS option is used. Create your document first, but using easily-found markers (such as "XXXX-to") to identify your intended dynamic (variable) fields. Then, print your document to a file using the newly installed printer driver. Using an ASCII text editor, edit the created Postscript file, changing marked sections into Postscript variables, usually by removing the marker and the accompanying parenthesis. For example, changing "(XXXX-from) SH" into "from SH". See faxcover(1) for an exact list of available faxcover variables. A sample BreakIntoLines routine can be seen at: http://www.hylafax.org/archive/2000-12/msg00090.html. For 4.1beta2 users, please review Bug 81.
For more information, refer to faxcover(1) and http://www.hylafax.org/HylaFAQ/Q202.html.
Reports Customization
faxcron is a command script that does routine upkeep tasks in a HylaFAX spooling directory hierarchy. This script is intended to be invoked from cron(8C) on behalf of the fax user once a day, with the standard output sent by mail to the HylaFAX administrator. In conjunction with recvstats, xferfaxstats, info, and other HylaFAX utilities, the fax administrator can receive informative daily fax reports.
See faxcron(8C), recvstats(8C), xferfaxstats(8C), and hylafax-info(5F) for details.
Mass Faxing, 1000+ daily
- For logging and error statistics, try Robert Colquhoun's errorstats script. See http://www.hylafax.org/HylaFAQ/Q344.html
- If you're using an old HylaFAX version, be aware of an applicable patch: http://www.hylafax.org/patches/posix-rename.patch.
- Matthias Reich rei@hagos.de is one of the mass-fax guys running HylaFAX on 10 servers with an output of up to 10,000 per day. He is running ten Suns with Solaris 2.4 and HylaFAX 4.0pl2 and one Linux box with HylaFAX 4.1beta2. He uses Multitech MT1432 BG, Multitech ZDX56 and some Elsa TQV33.6 Modems. He does error handling as follows:
- The user gets a mail for each failed fax. It is the user's responsiblity to check that the number is right (BTW, the most common error is users sending faxes to wrong numbers).
- The mail the user gets is "custom made". He changed the notify.awk script to give the user less detailed information e.g.: just the line was busy, no answer, or comm-failure.
- A script scans the logs and filters out the comm-errors (t.30 and so on).
- After getting this report he starts to investigate what is wrong. This begins with setting up the debuglevel for the dest-number, resending the fax, and having a close look in the log.
- After hopefully recognizing the error, he changes some settings for the destination in the info-directory to make the faxes work. Mostly setting down the speed or changing the min-scanline-time brings success. In more severe cases he has had success with attaching those destinations to be only used with his Elsa modems. After two or three weeks, the work decreases dramatically, and now his error rate is below 1 percent.
- And if anyone feels up to a challenge, Bernd Proissl has a good developer's suggestion, http://www.hylafax.org/archive/2000-08/msg00464.html.