三. 配置Hylafax 运行下列命令对服务器进行配置: faxsetup -server (必须以root身份进行该操作) 除了以下的几项外,对其它的询问选项都选取OK,即选取默认设值: · Country code [1]? enter 33 for France · Area code []? enter 1 for Paris · Long distance dialing prefix [1]? enter 0 · International dialing prefix [011]? enter 00 · Dial string rules file [etc/dialrules]? enter etc/dialrules.europe · Serial port that modem is connected to []? enter ttyS0 (for COM1) or ttyS1 (for COM2) Hylafax的默认设置在启动时并不自动的调用守护程序faxgetty,可以手工完成该 过程。 1、 编辑/etc/inittab文件,在文件的最后插入下面的内容: mo:2345:respawn:/usr/sbin/faxgetty -D ttyS0 然后运行kill -HUP l 重启faxgetty。 或者对rc.local文件进行改动: 2、 在/etc/rc.d/rc.local文件中加入下面几行: /usr/sbin/faxgetty -D /dev/ttys0 并运行命令:faxgetty -D /dev/ttys0 注意:用faxaddmodem命令可以添加多个调制解调器。 完成这些处理后,就为faxgetty创建了文件/var/spool/fax/etc/config.ttyS0 (串口1),其中包括了/dev/ttyS0调制解调器的配置。文件/usr/share/fax/hfaxd.conf 包含了hfaxd守护程序的配置,我没有对其进行任何改动。
可能出现的问题: 用probemodem命令来探测调制解调器,另外在/var/spool/fax/config中有一些典型 的配置 。 我的调制解调器是3Com的US Robotics 56K,因此我将usr-2.0文件复制到 /var/spool/fax/etc中,改名为config.ttyS0,并做如下修改: # Configuration for using the Class 2.0 command interface # with a USR v.34 Courier or Sporster modem. # # CONFIG: CLASS2.0: USRobotics*-* # CountryCode: 33 AreaCode: 1 #FAXNumber: your number ex (for france): 0134123412 LongDistancePrefix: 0 InternationalPrefix: 00 DiadStringRules: etc/dialrules.europe (Important .europe !) ServerTracing: 1 SessionTracing: 11 RecvFileMode: 0600 LogFileMode: 0600 DeviceMode: 0600 RingsBeforeAnswer: 1 SpeakerVolume: off GettyArgs: "-h %l dx_%s" #LocalIdentifier: "Your Company" (uncomment if wanted on the fax) #TagLineFont: etc/lutRS18.pcf (idem) #TagLineFormat: "De %%l|%c|Page %%p sur %%t" (idem) #MaxRecvPages: 25 ModemType: Class2.0 # use class 2.0 interface ModemRate: 57600 # 38400 DCE-DTE communication rate ModemFlowControl: rtscts # XON/XOFF flow control assumed ModemDialCmd: ATDT0%s # I added 0 because I go through a PABX !! #ModemNoFlowCmd: AT&H0&I0&R1 # setup modem for no flow control ModemHardFlowCmd: AT&H1&I0&R2 # setup modem for hardware flow control #ModemSoftFlowCmd: AT&H2&I2&R1 # setup modem for software flow control #ModemSetupDTRCmd: ATS13=1&D2 # setup so DTR drop resets modem #ModemSetupDCDCmd: AT&C1 # setup so DCD reflects carrier (or not) ModemResultCodesCmd: ATQ0X4 # enable extended result codes #ModemSetupAACmd: AT+FAA=1 #ModemSetVolumeCmd: "ATM0 ATM1 ATM1 ATM1 ATM1" Class2BUGCmd: AT+FBU=0 Class2CQQueryCmd: !(0),(0) # override modem response Class2NRCmd: AT+FNR=1,1,1,0 接下来在/var/spool/fax/etc/host中添加以下几行: localhost 192.168.0.1 允许所有在域192.168.1.0中的机器使用传真。