八、安装HylaFAX

apt install hylafax-server

安装过程中会弹出配置邮件服务界面,用于发送通知邮件,在此先不设置,选择“No configuration”。

如何配置ubuntu系统下的串口(AvantFAX搭建电子传真系统-安装HylaFAX02)(1)

九、配置HylaFAX

1. 查看Modem设备

进入/dev,ls命令查看相关设备文件。

如何配置ubuntu系统下的串口(AvantFAX搭建电子传真系统-安装HylaFAX02)(2)

2. 把USB Modem插到电脑上,再次ls设备文件,找出新增设备的名称,多为tty开头,我们可以看到新增设备为ttyACM0。

如何配置ubuntu系统下的串口(AvantFAX搭建电子传真系统-安装HylaFAX02)(3)

3. 为HylaFAX添加Modem设备

##输入命令 faxaddmodem ##提示输入设备名称,输入刚才所查到的ttyACM0(注意大小写) Serial port that modem is connected to [ttyS0]? ttyACM0 Ok, time to setup a configuration file for the modem. The manual page config(5) may be useful during this process. Also be aware that at any time you can safely interrupt this procedure. Reading scheduler config file /var/spool/hylafax/etc/config. No existing configuration, let's do this from scratch. ##输入国家代码 Country code [1]? 0086 ##输入区号 Area code [415]? 020 ##输入电话号码(按实际填写,或随意输入也可) Phone number of fax modem [ 1.999.555.1212]? 88888888 ##设置本地传真机标识,直接回车 Local identification string (for TSI/CIG) ["NothingSetup"]? ##长途拨号前缀 Long distance dialing prefix [1]? 0 ##国际拨号前缀 International dialing prefix [011]? 00 ##拨号字符串规则文件,直接回车 Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]? ##追踪正常服务,直接回车 Tracing during normal server operation [1]? ##追踪发送和接收会话,直接回车 Tracing during send and receive sessions [11]? ##接收传真的保护模式,输入0777 Protection mode for received facsimile [0600]? 0777 ##会话日志的保护模式,输入0777 Protection mode for session logs [0600]? 0777 ##ttyACM0的保护模式,输入0777 Protection mode for ttyACM0 [0600]? 0777 ##震铃多少声后,开始接收传真,按需求自行输入 Rings to wait before answering [1]? 2 ##打开Modem喇叭音量,on打开,off关闭 Modem speaker volume [off]? ##其它选择直接回车 Command line arguments to getty program ["-h %l dx_%s"]? Pathname of TSI access control list file (relative to /var/spool/hylafax) [""]? Pathname of Caller-ID access control list file (relative to /var/spool/hylafax) [""]? Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]? Tag line format string ["From %%l|%c|Page %%P of %%T"]? Time before purging a stale UUCP lock file (secs) [30]? Hold UUCP lockfile during inbound data calls [Yes]? Hold UUCP lockfile during inbound voice calls [Yes]? Percent good lines to accept during copy quality checking [95]? Max consecutive bad lines to accept during copy quality checking [5]? Max number of pages to accept in a received facsimile [25]? Syslog facility name for ServerTracing messages [daemon]? Set UID to 0 to manipulate CLOCAL [""]? Use available priority job scheduling mechanism [""]? ---------- Your facsimile phone number (88888888) does not agree with your country code (0086) or area code (020). The number should be a fully qualified international dialing number of the form: 0086 020 <local phone number> Spaces, hyphens, and periods can be included for legibility. For example, 0086.020.555.1212 is a possible phone number (using your country and area codes). The non-default server configuration parameters are: CountryCode: 0086 AreaCode: 020 FAXNumber: 88888888 LongDistancePrefix: 0 InternationalPrefix: 00 DialStringRules: etc/dialrules SessionTracing: 11 RingsBeforeAnswer: 2 SpeakerVolume: off GettyArgs: "-h %l dx_%s" LocalIdentifier: "NothingSetup" TagLineFont: etc/lutRS18.pcf TagLineFormat: "From %%l|%c|Page %%P of %%T" MaxRecvPages: 25 ##确认配置信息 Are these ok [yes]? Now we are going to probe the tty port to figure out the type of modem that is attached. This takes a few seconds, so be patient. Note that if you do not have the modem cabled to the port, or the modem is turned off, this may hang (just go and cable up the modem or turn it on, or whatever). ##等待Modem速度测试 Probing for best speed to talk to modem: 38400 OK. About fax classes: The difference between fax classes has to do with how HylaFAX interacts with the modem and the fax protocol features that are used when sending or receiving faxes. One class isn't inherently better than another; however, one probably will suit a user's needs better than others. Class 1 relies on HylaFAX to perform the bulk of the fax protocol. Class 2 relies on the modem to perform the bulk of the fax protocol. Class 2.0 is similar to Class 2 but may include more features. Class 1.0 is similar to Class 1 but may add V.34-fax capability. Class 2.1 is similar to Class 2.0 but adds V.34-fax capability. HylaFAX generally will have more features when using Class 1/1.0 than when using most modems' Class 2 or Class 2.0 implementations. Generally any problems encountered in Class 1/1.0 can be resolved by modifications to HylaFAX, but usually any problems encountered in Class 2/2.0/2.1 will require the modem manufacturer to resolve it. Use Class 1 unless you have a good reason not to. This modem looks to have support for Class 1.0 and 1. ##直接回车,使用默认参数 How should it be configured [1.0]? Hmm, this looks like a Class 1.0 modem. Product code (ATI0) is "56000". Other information (ATI3) is "CX93001-EIS_V0.2002-V92". ##直接回车,使用默认参数 DTE-DCE flow control scheme [default]? Modem manufacturer is "Rockwell/Conexant". Modem model is "AC/K56". Using prototype configuration file conexant-1.0... The modem configuration parameters are: ModemFlowControl: rtscts ModemHardFlowCmd: AT&K3 ModemNoFlowCmd: AT&K0 ModemRate: 19200 ModemSetupDCDCmd: AT&C1 ModemSetupDTRCmd: AT&D2 ModemSoftFlowCmd: AT&K4 ##确认Modem参数配置,直接回车 Are these ok [yes]? Creating new configuration file /var/spool/hylafax/etc/config.ttyACM0... Creating fifo /var/spool/hylafax/FIFO.ttyACM0 for faxgetty... done. Done setting up the modem configuration. Checking /var/spool/hylafax/etc/config for consistency... ...everything looks ok; leaving existing file unchanged. Don't forget to restart hylafax in order to run faxgetty on this new modem line. /var/spool/hylafax/config ##至此,配置完毕

如需修改相关配置参数,可直接编辑/etc/hylafax/config.ttyACM0进行修改,文件内容如下。

# $Id$ # # Configuration for a Rockwell/Conexant K56 Class 1.0 modem using # the RCV56DPF and similar chipsets. These chipsets are generally # flash- upgradable and appear on ISA as well as PCI. They # support "Class 1.0" which means that they have "adaptive receive" # (AT FAR=1), but not V.34. # # Comtrol RocketModem II/III/IV # MultiTech MT5600ZDX # Zoltrix FMVSP56i3 # # CountryCode: 0086 AreaCode: 020 FAXNumber: 88888888 LongDistancePrefix: 0 InternationalPrefix: 00 DialStringRules: etc/dialrules ServerTracing: 1 SessionTracing: 11 RecvFileMode: 0777 LogFileMode: 0777 DeviceMode: 0777 RingsBeforeAnswer: 2 SpeakerVolume: off GettyArgs: "-h %l dx_%s" LocalIdentifier: "NothingSetup" TagLineFont: etc/lutRS18.pcf TagLineFormat: "From %%l|%c|Page %%P of %%T" MaxRecvPages: 25 # # # Modem-related stuff: should reflect modem command interface # and hardware connection/cabling (e.g. flow control). # ModemType: Class1.0 # use this to supply a hint ModemRate: 19200 # rate for DCE-DTE communication ModemFlowControl: rtscts # default # # With the RocketModem IV (and possibly III) you may need to use a much # higher ModemRate than 19200 because, apparently, it suffers from potential # buffer underrun problems. Fortunately, it doesn't have buffer overflow # issues, and so using 115200 should work (both rtscts and xonxoff test good). # ModemNoFlowCmd: AT&K0 # setup no flow control ModemHardFlowCmd: AT&K3 # setup hardware flow control ModemSoftFlowCmd: AT&K4 # setup software flow control ModemSetupDTRCmd: AT&D2 # setup so DTR drop resets modem ModemSetupDCDCmd: AT&C1 # setup so DCD reflects carrier (or not) # Class1AdaptRecvCmd: AT FAR=1 # reports carrier detection mismatches

4. 运行faxsetup命令,让配置生效,所有选项直接回车。重启一次HylaFAX服务

faxsetup service hylafax restart

《Ubuntu下使用HylaFAX AvantFAX搭建电子传真系统-基础服务安装01》

《Ubuntu下使用HylaFAX AvantFAX搭建电子传真系统-安装AvantFAX03》

《Ubuntu下使用HylaFAX AvantFAX搭建电子传真系统-配置Postfix04》

,