Introduction
- References
- HylaFAX web site - its a good idea to go through this site first and explore some of its links.
- HylaFAX man pages
- We are using the latest rpm release hylafax-4.1beta1-1rh6.i386.rpm. It can be obtained from rpmfind.net
- Before proceeding with the HylaFAX install, ensure the following packages have also been installed.
- Ghostscript >= V5.10
- gawk >=V3.0.0
- libtiff >= V3.4
- libjpeg6a
- ghostscript-fonsts-std >=5.10-8
These files can all be obtained from rpmfind.net.
Checking the Modem
- I used minicom and ran it as root with the -s option. Set the serial port to /dev/ttyS1 (your modem may be on another serial port), and baudrate to 115200. Exit the configuration menu and watch the modem get initialised. Type 'ata'. The modem should 'hook release' and sound a training tone. Hit [cr], and it should stop. - If modem is not working check setserial for correct io address and irq.
- At this stage it is a good idea to confirm the class of the fax modem with a 'at+fclass=?' to see what classes the modem support.
Setting Up Hylafax
- Once HylaFAX is setup run faxsetup as root. It will check some confguration options and prompt you for information. Once this script has done its job, it produces the following two files:
- >>>>>>>>>>>>>>>>>>>>>>>/var/spool/fax/etc/config
LogFacility: daemon CountryCode: 1 AreaCode: 604 LongDistancePrefix: 1 InternationalPrefix: 011 DialStringRules: etc/dialrules ServerTracing: 1- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</var/spool/fax/etc/config
- >>>>>>>>>>>>>>>>>>>>>>>/var/spool/fax/etc/config.ttyS1
CountryCode: 1 AreaCode: 604 FAXNumber: 604-274-2277 LongDistancePrefix: 1 InternationalPrefix: 011 DialStringRules: etc/dialrules ServerTracing: 1 SessionTracing: 11 RecvFileMode: 0600 LogFileMode: 0600 DeviceMode: 0600 RingsBeforeAnswer: 0 SpeakerVolume: off GettyArgs: "-h %l %s" LocalIdentifier: "Novatek Electronics" TagLineFont: etc/lutRS18.pcf TagLineFormat: "From %%l|%c|Page %%p of %%t" MaxRecvPages: 255 # # # Modem-related stuff: should reflect modem command interface # and hardware connection/cabling (e.g. flow control). # ModemType: Class1 # use class 1 interface ModemRate: 38400 ModemFlowControl: rtscts # default # ModemNoFlowCmd: AT&K # disable flow control cmd ModemHardFlowCmd: AT&K3 # hardware flow control cmd ModemSoftFlowCmd: AT&K4 # software flow control cmd ModemSetupDTRCmd: AT&D3 # setup so DTR drop resets modem ModemSetupDCDCmd: AT&C1 # setup so DCD reflects carrier (or not) ModemSetupAACmd: AT+FAA=0 # in case modem supports Class 2 also # ModemMfrQueryCmd: !Rockwell # no way to query modem ModemModelQueryCmd: !RC32ACL # not always right ModemRevQueryCmd: ATI3 # # Manually added config values # ModemDialCmd: ATX3DT%s- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</var/spool/fax/etc/config.ttyS1
- It is worthwhile having a look at the config man page. Following is a list of items in the above files that I changed from the defaults:
RingsBeforeAnswer: 0. This is a fax sending service, not a fax answering service. We use efax.com for that purpose. (Faxes arrive as emails. The caveat here is that efax.com have a MS Windows compatible reader, and I have not found anything in the UNIX world to read efax emails yet). ModemDialCmd: ATX3DT%s. This last line in /var/spool/fax/etc/config.ttyS1 was manually added. The fax line is shared with a telephone line with a voice mail service, and does not understand the dial tone that indicates voice messages waiting - so we just disable dial tone monitoring. Have a look at the config man page. The next thing we do is install /usr/sbin/faxgetty in /etc/inittab. We add the following line to /etc/inittab, near the bottom.
- s1:2345:respawn:/usr/sbin/faxgetty ttyS1
Remember to 'telinit q' so that init will see faxgetty. Checking the Installation
- Logged in as any user run faxstat and you should see something similar to the following:
- ------------------------------------
HylaFAX scheduler on gateway: Running Modem ttyS1 ((604)274-2277): Running and idle- ------------------------------------
- The next thing to check is sending a simple fax. Enter the following:
- ------------------------------------
sendfax -n -d <telnr> <<EOF This is a test EOF- ------------------------------------
- Where telnr is an actual receiving fax number.
Some Useful Commands and Files
- faxstat -s - look at status of fax q - items to be sent
- faxrm <n> - removes a job <n> from the queue - only owner can rm job
- /var/spool/fax/etc/xferfaxlog - log of recently sent faxes
Viewing Received Faxes
- Received faxes are stored in TIFF/F format in /var/spool/fax/recvq/ Viewed faxes can be interogated with 'faxinfo', converted to postscript with 'fax2ps' and viewed with 'gv'. Do a man on these programs to find out more. There is also nothing stopping us from using mgetty's viewfax program.
- I am skimpy on details here - services like www.efax.com, obsolete receiving faxes by telephone line.
Fax Maintenance
- With a RedHat install, this is generally done for us. faxcron is run by cron on a daily basis. I added faxclean to this file.
- >>>>>>>>>>>>>>>>>>>>>>>/etc/cron.daily/hylafax
#!/bin/sh /usr/sbin/faxcron | mail faxmaster /usr/sbin/faxqclean exit 0- <<<<<<<<<<<<<<<<<<<<<<</etc/cron.daily/hylafax
- Personally I find daily frequency too much for sending a fax log. I moved this file to the /etc/cron.weekly directory.
- Also need to confirm /etc/logrotate.d/hylafax
- >>>>>>>>>>>>>>>>>>>>>>>>>/etc/logrotate.d/hylafax
/var/spool/fax/etc/xferfaxlog { rotate 3 monthly compress }- <<<<<<<<<<<<<<<<<<<<<<<<<<<<</etc/logrotate.d/hylafax
Setting up Hylafax Clients, and Graphical Interfaces
- Although we could set up a graphical user interface on Gateway, we'd rather not. Gateway is the firewall, and we do not want to have it accessable to all local users. Also Gateway is only a 486DX2-66 with only 32Mb of RAM. Burdening Gateway with X apps, is not right, it will excessively load the CPU, and provide really slow performance.
- Setting up Fax clients and Fax graphical interfaces is covered under the common configuration section.
Last modified: Tue Feb 8 22:00:00 PST 2000
Copyright © Jonathan Marks, 1999, 2000. All rights
reserved.
http://jon.novatek.co.nz/linux/config/gateway-fax.html.