> 最近一段时间经过多次试验,已经将HylaFAX传真服务器基本试验成功!有几点心得在此发表,共大家分享!
> 根据:http: //www.chinabyte.com/20030318/1657865.shtml文章的内容进行配置[有根据实际情况进行相关改动!],但有些不同的地方以及在试 验HylaFAX过程在碰到的问题在此说明一下!
>
> 第一部分:服务器端安装!
>
> 第一步,确定你的硬件正常工作,重点的是MODEM!
> 确定你的MODEM可以正常工作!这次试验中公司的MODEM坏了,而HENRY带过来的MODEM在WIN98 OS下可以正常使用,但不支持WINFAX![我在WIN98上安装WINFAX发送传真,做测试MODEM的作用!],在MODEM问题上浪费了不少时 间和精力![MODEM我向同学借了,现在很难借到外置MODEM,内置MODEM有试过,好像都不正常工作,因此推荐使用外置MODEM!]
> 确定MODEM可以在LINUX[不管是哪一种LINUX]下可以正常的拔号上网!如何在LINUX下拔号上网,吴伟有文章!请在IT-NEWS中找!主旨是:"[it-news] Fw:LINUX MODEM DIALUP" 。
> 说明:在以上的安装文章中有提到:
> [/root ] cu -l ttyS1
>   Connected
>   at+fclass=?
>   0,1,8
>   OK
>   ~[athlon].
>   Disconnected
> 的这项测试连接,我都无法成功,可以略过!只要你的MODEM能够拔号上网就说明MODEM已经跟电脑相连成功,并通讯正常!
>
> 第二步,确定安装的软件![我的试验平台]
> a.OS: Debian 3.0r1
> b.GhostScript,这是HylaFAX中用来解释传真客户端传来的ps[后面有介绍]文件的语言!在DEBIAN它的包叫做gs,你只要使用 apt-get install gs就可以安装了,在REDHAT下包名是:ghostscript
> 当然你也可以使用源代码安装,安装后,在configure HylaFAX时要改动ghostscript的文件位置即可!
> c.libtiff,即TIFF,更确切的说TIFF/F,是传真使用的标准格式。
> 我的Debian下的包是:libtiff-tools 3.5.5-6woody1 TIFF manipulation and conversion tools
> libtiff3g 3.5.5-6woody1 Tag Image File Format library
> REDHAT下的我没去找!你可以自行找一下!
>
> 第三步,安装HylaFAX传真服务器
> 到www.hylafax.org下载软件![应该下载hylafax-4.2.0.tar.gz,我安装过hylafax-4.1.2.tar.gz后,它不能发送PS类型的文件。]
> 安装在此不做介绍,就是安装的三步骤,或者你也可以到官方网上的安装文件! http://www.hylafax.org/howto/install.html
> 不过在此有提醒一下,在安装过程有些依赖的软件包,但缺少时会有提,你要先中断安装,先去下载安装相关的软件包后再重新来,我安装时少了zlib,我用 apt-cache search zlib安装相关合适的软件包即可,注意要看apt-cache后的结果后面的介绍再装!
> 要记住当出现这个错误的话:

TIFFINC=/usr/local/include
LIBTIFF=-L/usr/local/lib -ltiff

Verify that you have the TIFFINC and LIBTIFF configuration parameters
set correctly for your system (see above) and that any environment
variables are setup that are needed to locate a libtiff DSO at runtime
(e.g. LD_LIBRARY_PATH). Also be sure that any relative pathnames are
made relative to the top of the build area.

Unrecoverable error! Once you've corrected the problem rerun this script.


请安装这个包:libtiff3g-dev以解决这个问题!

在做faxaddmodem时,请选用Class 1

注意:安装完成后,要reboot一下系统!否则可能会出现:
Apr 11 16:20:54.22: [ 2064]: SEND FAILED: JOB 1 DEST 2673111 ERR No carrier detected
的错误!
如果出现这个错误:
Apr 11 16:44:23.17: [ 2748]: SEND FAILED: JOB 2 DEST 2673111 ERR Busy signal detected
要么就是对方占线,要么就是对方不是传真机,说明一下,2673111是电话,而不是传真机,因此会有这样的错误!是偶记错了,2673111是我们总机,2673222才是我们的传真!

> 其它的步骤按照上面我提到的那篇文章就可以了!
> 还要要设权限时,请使用faxadduser增加用户,详细请看faxadduser --help即可!
>
> 然后就可以启动HylaFAX服务器了,你可以使用netstat -tln就可以看到有HylaFAX的端口在侦听了,即4559!
>
> 这里你可以使用faxsend命令发送一封测试的邮件了!
> faxsend -n -d05941653185 full_filename -d参数后紧跟对方的传真号码,full_filename为要发送的文本文件名!
> 详细见faxsend --help or man faxsend
>
> 以上配置完后,HylaFAX服务器就搞定了!
> 有空到HylaFAX官方网站上看相关文档和FAQ就可以解决相应的问题,我看了一些,不是太难,基本能看懂!
>
> 注意一下:据我了解HylaFAX只能支持tiff,pdf,ps文件格式发送!接收到的传真是tif文件,可以使用Irfanview查看,然后根据需要决定是否打印!接收部分暂时使用WEB方式!要看公司的需要,然后决定采取适当的方式!
>
>
> 第二部分:客户端部分!
> 在HylaFAX官方网站上有介绍几个客户端,有一些是收费的,我借鉴天极网的那篇文件使用WHFC[ http://www.uli-eckhardt.de/whfc/],有分1.09和1.23,其中1.09有中文语言界面支持!
> 在http: //www.uli-eckhardt.de/whfc/1.2/docu/index.shtml有关使用方法的介绍!可以慢慢研读!这个 客户端即可以发送也可以接收传真!
> 比较重要的有几点,配置部分分系统配置和用户配置,系统配置只要填HylaFAX服务器的IP地址即可!其它的基本按默认即可!用户配置部分,填写些发送 传真者的信息,名字,登录名[用来HylaFAX用户认证,只要通过用户认证才能通过HylaFAX来收发传真!],以及MAIL地址[发信通知发传真者 此传真的状态,成功与否?]等!


客户端软件安装设置部分:
软件下载地址: http://www.uli-eckhardt.de/whfc/1.2/download.shtml���我下载的是1.2.3安装包!


注意:客户端安装WHFC时,如果是Administrator用户使用时不会出现什么问题!假是是WINDOWS XP,而且是限制性用户使用时,则须这样安装WHFC:
第一:以Administrator用户安装WHFC以及FAX打印机!
原因:由于PTO有一部分是安装WINDOWS XP,同时我给他们的只是受限制的用户!因此安装过程中可能会出现一些问题!这里从头说一下!

Fax printer Installation :
Go to the windows printer installation. Add a new printer. Choose here a local connected printer. It's important that you use a postscript driver. I recommend the "Apple LaserWriter 16/600" for NT or "Apple LaserWriter" for Windows 95. Connect this with the FAX: port (1) (this port is visible after registering it with regmon.exe). Then enter in the configure port dialog via "Configure Port" (2) and choose here a directory for the temporary spool files. For german users of Windows 95 i have added a picture of the printer dialog with the numbers on it, so you can see, which buttons i mean.

第二:运行WHFC,并且要设置好所有的资料/System配置,包括客户端使用者的资料,包括传真号码,电话,公司,地区等,这些在发送
传真是并不会加到传真中去,但是这样填完后,当客户用非Administrator用户跑WHFC时就不会有错误了[一般时什么注册信息错误]!同时还要用Administrator用户试发
一封传真,直到选择打印机那一步,然后弹出WHFC对话框,要求输入对方传真号码!这时不必填,可以直接关闭WHFC!这样做下一步时就不会出错!
[这个原因困扰了我很久,我想可能是由于第一次发传真时,要验证FAX用户的帐号,如果Administrator没有去做时,用非Administrator去发时,就要写一些信息到系统中去,这时权限就不够,就会出现错误!]
第三:切换用户到普通用户,在程序集中没有WHFC程序,要到安装目录下寻找WHFC程序,
第四:要重设一下WHFC的客户端资料[System设置普通用户不能设置]!

>
>
> 第三部分:传真文件支持!
> HylaFAX 4.2.0只支持tiff,pdf,ps文件,其它的文件HylaFAX服务器均无法读懂,因此EMAIL,HTML,WORD等文档均无法发送!
> 在GOOGLE查找以及在武聪的帮助下使用Adobe Universal PostScript Windows Driver,将EMAIL,HTML,WORD文档转成ps文件,即可以发送,Adobe Universal PostScript Windows Driver是一个驱动,安装完后它会是一个打印机,跟一般打印机不同的是它会将文件输出到文件中!即ps文件!
> 同时WHFC也自带一个,方法:
> 安装完WHFC[安装过程中会自动运行RegMon程序来注册一个打印端口[WHFCFAX:(WHFC Faxprinter port)],直接输入出到WHFC,由WHFC发送要打印的文件],此时输出的文件也是ps格式!这时只是一个打印机的端口,因此要安装一个打印机,具 体方法见:
> http: //www.uli-eckhardt.de/whfc/1.2/docu/install.shtml中的
>
> Fax printer Installation :
>
> Go to the windows printer installation. Add a new printer. Choose here a local connected printer. It's important that you use a postscript driver. I recommend the "Apple LaserWriter 16/600" for NT or "Apple LaserWriter" for Windows 95. Connect this with the FAX: port (1) (this port is visible after registering it with regmon.exe). Then enter in the configure port dialog via "Configure Port" (2) and choose here a directory for the temporary spool files. For german users of Windows 95 i have added a picture of the printer dialog with the numbers on it, so you can see, which buttons i mean.
>
> 这样我们就可以发送大多数文件类型的文档了!

配置文件范例:

使用faxaddmodem时产生的文件!也可以手动更改!

文件:/var/spool/hylafax/etc/config.ttySX 注:X为接口名,第一个为0,第二个为1,我们一般是ttyS0

CountryCode: 0086
AreaCode: 594
FAXNumber: +00865942676568
LongDistancePrefix: 917909
InternationalPrefix: 917909
DialStringRules: etc/dialrules
ServerTracing: 1
SessionTracing: 11
RecvFileMode: 0600 ;接收到的传真,即tiff文件的权限是多少!一般是666,600有的用户读不了!特别是www用户,因为很多用户用web方式观看或下载传真内容!
LogFileMode: 0600 ;指log文件的权限
DeviceMode: 0600
RingsBeforeAnswer: 1
SpeakerVolume: on
GettyArgs: "-h %l dx_%s"
LocalIdentifier: "CJCHT-PTO" ;LocalIdentifier为传真后显示的名字!即发送人或发送单位!为From后面的字符,即TagLineFormat这个参数中的From中 的%%1的值!
TagLineFont: etc/lutRS18.pcf
TagLineFormat: "From %%l|%c|Page %%P of %%T" ;传真头显示的字!可以增加发送传真的电话的号码,"|"为分隔符.代表平分行首的空间!即每一个"|"之间的空间大小都一样!是指显示!
#TagLineFormat: "From %%l|%c|PHONE Number:0086-594-2676568|Page %%P of %%T"
MaxRecvPages: 25
#
#
# Modem-related stuff: should reflect modem command interface
# and hardware connection/cabling (e.g. flow control).
#
ModemType: Class1 # use class 1 interface
ModemRate: 19200 # locked for fax sending&receiving
ModemFlowControl: rtscts # default
#
ModemNoFlowCmd: AT/Q0 # disable flow control cmd
ModemSoftFlowCmd: AT/Q1 # software flow control cmd
ModemHardFlowCmd: AT/Q3 # hardware flow control cmd
ModemSetupDTRCmd: AT&D3 # DTR off causes modem to reset
ModemSetupDCDCmd: AT&C1 # DCD follows carrier
#
ModemDialCmd: ATDT%s # T for tone dialing


文件位置: /usr/local/lib/fax/hfaxd.conf


#
# HylaFAX Client-Server Protocol Configuration.
#
# Consult hfaxd(1M) for information on the contents
# of this file. Note that pathnames specified in
# this file are relative to the root of the spooling
# area because hfaxd uses chroot to confine client
# accesses to the server's filesystem.
#
LogFacility: daemon # syslog facility (want this 1st))
ServerTracing: 0x001 # just server operation
#IdleTimeout: 900 # initial client idle timeout (secs)
#MaxIdleTimeout: 7200 # max client idle timeout (secs)
#MaxLoginAttempts: 5 # max # login attempts before disconnect
#MaxAdminAttempts: 5 # max # admin attempts before disconnect
#MaxConsecutiveBadCmds: 10 # max # invalid cmds before disconnect
#FaxContact: FaxMaster # who gets questions/complaints
#AdminGroup: faxadmin # which user group is admin (when using PAM)
#UserAccessFile: "/etc/hosts.hfaxd" # user+host access control file
#ShutdownFile: "/etc/shutdown" # server shutdown control filename
#XferLogFile: "/etc/clientlog" # for logging client file transfers
#FaxQFIFOName: "/FIFO" # FIFO name for talking to faxq process
#
# The default format used to return job status queries.
# Note that clients can override this with JOBFMT.
#
JobFmt: "%-3j %3i %1a %6.6o %-16.16e %5P %5D %7z %.25s"
#
# The default format used to return recvq status queries.
# Note that clients can override this with RCVFMT.
#
#RcvFmt: "%-7m %4p%1z %-8.8o %14.14s %7t %f"
#
# The default format used to return modem status queries.
# Note that clients can override this with MODEMFMT.
#
#ModemFmt: "Modem %m (%n): %s"
#
# The default format used to return file-oriented
# directory listings.
# Note that clients can override this with FILEFMT.
#
#FileFmt: "%-7p %3l %8o %8s %-12.12m %.48f"

#
# SNPP-specific parameters.
#
#MaxMsgLength: 128 # max pager message length
#PagerIDMapFile: "/etc/pagermap" # file with pager ID mapping rules
#
# The following three items define the mapping from
# SNPP service level to job scheduling priority and
# expiration (kill) time. Each item should have a
# list of 12 values that define the mapping for service
# levels 0 through 11 (first item is level 0, second
# item level 1, ... etc.).
#
#PriorityMap: "63 127 127 127 127 127 127 127 127 127 127 127"
#RetryTimeMap: "30 60 60 180 0 0 0 0 0 0 0 0"
KillTimeMap: " 5 5 5 15 60 240 720 1440 1440 1440 1440 1440"



我碰到一个问题:如何改变收到FAX的通知信和发送FAX成功或者失败的通知信的内容,在网上找到了答案:
即更改:/var/spool/hylafax/bin/faxrcvd文件中的相关设定,可以看里而的东西进行相应更改!

http://www.hylafax.org/archive/2005-01/msg00263.html

___________________________________________
Re: [hylafax-users] faxmail, change sender?

* To: "'Hylafax-Users Mailingliste'" <hylafax- users@xxxxxxxxxxx>
* Subject: Re: [hylafax-users] faxmail, change sender?
* From: "Shawn Zernik" < szernik@xxxxxxxxxxxxxxxxxxxxxxxxxx>
* Date: Sat, 22 Jan 2005 14:34:40 -0600

I'm running Hylafax and it seems that faxq is dieing after about 50 faxes.
When I run "faxq -D" I get a segmentation fault until I stop hylafax, remove
the etc/config, run fax setup, kill the faxgetty's, and restart the server.
Faxing then resumes as normal until the next crash.

Any suggestion on how to debug faxq in more detail, or how to fix this?

Shawn Zernik
Internetwork Consulting
www.internetworkconsulting.net

-----Original Message-----
From: hylafax-users- bounce@xxxxxxxxxxx
[mailto:hylafax-users- bounce@xxxxxxxxxxx] On Behalf Of Sven Gehr
Sent: Monday, January 17, 2005 7:54 AM
To: Hylafax-Users Mailingliste
Subject: Re: [hylafax-users] faxmail, change sender?

Am Do 13.01.2005 11:26 schrieb Bodo Meissner < bodo@xxxxxxxxx>:
>Am 2005.01.13 08:19 schrieb(en) Sven Gehr:

Hi@all,


>>In the incomming faxmail was the from set to:
>>
>>+49 621 48293xx
>>
>>I need the format:
>>
>> 004962148293xx@fax.[myserver].[mylocaldomain]
>>
>>How can i adjust this?
>
>MYSENDER=`echo $SENDER|sed -e 's/ //g' -e 's/^+/00/' -e 's/$/@fax.
>[myserver].[mylocaldomain]/'`
>
>This simple solution works only if $SENDER is in the format of your
>example.
>
>I think $SENDER is what the sender configured in his fax machine or fax
>server. You must expect to get different number formats, empty strings,
>something like "<unknown>" or other junk.

ok, i test following:

I define in /var/spool/fax/bin/faxrcvd //这里的fax是指Hylafax安装目录,我们默认一般是在:/var/spool/hylafax/bin/faxrcvd

[...]
ABSENDER=`echo $SENDER|sed -e 's/ //g' -e 's/^+/00/' -e
's/$/@fax.postgirl.dreampixel/'`
[...]
if [ -n "$SENDTO" ]; then
(MIMEBOUNDARY="NextPart$$"
echo "Mime-Version: 1.0"
echo "Content-Type: Multipart/Mixed; Boundary=/"$MIMEBOUNDARY/""
echo "Content-Transfer-Encoding: 7bit"
echo "To: $SENDTO"
echo "From: $ABSENDER"
[...]

The incomming mail has:

""@fax.postgirl.dreampixel

in the from-field.

with best regards
sven
____________________________________________________________________________________

说明: /var/spool/hylafax/bin/notif 此文件为发送传真发送MAIL内容的Script,不管成功与否都会收到相应的MAIL!请读一下这个脚本文件!



第四部分:用户发送和接收传真:
我有做了一份用户使用的演示版,有需要的可以联系我:QQ:57623579,MAIL: zubin006@163.com, Yahoo ID:pto_zubin006,Skype ID: pto_robin
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐