ben | 10 九月, 2005 12:11

這是以前一直想完成的fax server,但受限於許多因素,一直未完成它,如今把它完成了,心裡有莫名的興奮,一個字----------爽...ccc......


參考資料

樂咖黑電腦學習網

熊寶貝手札

酷學園討論區傳真伺服器HylaFax + printfax.pl + respond

 

作法(fc3 安裝hylafax client pc: windows pro xp)

 

下載halyfax套件,http://rpm.pbone.net hylafax套件

 

安裝hylafax

 

#rpm -ivh hylafax-4.2.1-1fc3.i386.rpm

 

如果與發生衝突就把mgetty-sendfax 移除

 

#rpm -e mgetty-sendfax

 

設定

 

1. 確定數據機

檢查數據機是否裝好,電源是否打開,及連接埠是那一個(一般是ttyS0), 內定為COM 1ttyS0,COM 2 ttyS1(請注意大小寫,是有分別)

2. 執行faxsetup(以下是熊寶貝手札的說明,提供參考)

 

首先會秀出一些說明,接著第一個問題是
You do not appear to have a "fax" user in the password file.
HylaFax needs this to work properly. add it [yes]?
新增一個使用者fax,YES enter
Should an entry be added for the FaxMaster to /etc/aliases [yes]?
/etc/aliases加入別名,YES enter
Users to receive fax related mail [root]?
root
將收到的傳真相關的mail(如果統計報表等) ,enter
Country code [1]?
電話國碼886(台灣)輸入886 enter
Area code []?
區碼(台北2)(就是02去掉0) 輸入2 enter
Long distance dialing prefix [1]?
長途碼 0 ,輸入0 Enter
International dialing prefix [011]?
國際電話前置碼002,輸入002 Enter
Dial string rules file (relative to /var/spool/hylafax)["etc/dialrules"]?
撥號規則檔設為/var/spool/hylafax/etc/dialrule,enter
Tracing during normal server operation [1]?
啟動除錯選項按enter
Default tracing during send and receive session [0xfffffffff]?
收送傳真的除錯,我也不懂按enter
Continuation cover page (relative to /var/spool/hylafax) []?
設定封面的頁的所在目錄,enter
Timeout when converting PostScript documents (secs) [180]?
設定轉換為ps文件的逾時時間180,enter
Maximum number of concurrent jobs to a destination[1]?
最大同時傳送一個目的的工作數,當然是1
Define a group of modems []
除非你有好幾台數據機,enter
Time of day restrictions for outbound jobs ["Any"]?
限制外送傳真的時間Any(任何時間),enter
Pathname of destination controls file (relative to /var/spool/hylafax) []?
所有安裝目的控制檔的所在目錄 相對於/var/spool/hylafax,enter
Timeout before purging a stale UUCP lock file (secs) [30]
好像不使用了,enter
Max number of pages to permit in an outbound job [0xffffffff]
外送傳真的最多頁數,enter
Syslog facility name for ServerTracing messages [daemon]?
相關於記錄檔是記錄在/var/log/messages接著秀出你先前的設定問你要不要更改沒錯的話就按enter
Restarting Hylafax server process.
Should I restart the Hylafax server process [yes]?
要啟動hylafax,enter
You do not appear to have any modem configured for use. Modems are
ocnfigured for use with HylaFax with the faxaddmodem[8C] command.
Do you want to run faxaddmomdem to configure a modme [yes]?
你尚未指定任何數據機.現在是否要設定使用faxaddmodem命令(這個命令可以新增數據機),Enter
Serial port that modem is connected to []?
數據機的連接埠一般為ttyS0
country code[1]
886
Area code [415]?
(
台北,基隆) 2
Phone number of fax modem [+1,9999.5555.1212]?
你數據機所接的電話號碼,+1是國碼(台灣+886)逗點後面就是區碼加電話號碼
Local Identifications string (for TS/CIG) ["NothingEtup"]?
傳真機的識別ID,一般使用電話號碼或是公司的英文縮寫不可太長 sony,當你傳真時顯示在對方傳真機LCD的字
Long distance dialing prefix [1]?
0
International dialing prefix [011]?
002
Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]?
enter
Tracing during normal server operation [1]?
enter
Tracing during send and receive sessions [11]?
enter
Protection mode for received facsimile [0600]?
收到傳真的檔案權限,如果你要以samba開放目錄,讓使用者讀取請最好改為0644
Protection mode for session logs [0600]?
記錄檔的檔案權限
Protection mode for ttyS0 [0600]?
連接埠的存取權限
Rings to wait before answering [1]?
enter
Modem speaker volume [off]?
enter
Command line arguments to getty program ["-h %l dx_%s"]?
enter
Pathname of Tsi access control list file (relative to /var/spool/hylafax)[""]?
Tsi
存取控制檔的目錄所在
Pathname of Caller-ID access control list file (relative to /var/spool/hylafax)[""]?
Caller-ID
存取控制檔的目錄所在
Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]?
所有的傳真最上面有一行包含了(送件人,收件人,日期,公司等)資料我們稱為tag line所使用的字型
Tag line form string ["From %%1|%c|Page %%P of %%T"]?
Tag line
的格式
Time before purging a stale UUCP lock file (secs) [30]?
enter
Hold UUCP lockfile during inbound data calls [Yes]?
enter
Hold UUCP lockfile during inbound voice calls [Yes]?
enter
Percent good lines to accept during copy quality checking [95]?
enter
Max consecutive bad lines to accept during copy quality checking [5]?
enter
Max number of pages to accept in a received facsimile [25]?
(
一次)傳真進來的最大可接收頁數
Syslog faxility name for ServerTracing messages [daemon]?
enter
Set UID to 0 to manipulate CLOCAL [""]?
enter
Use available proiority job scheduling mechanism [""]?
enter
Are these ok [yes]?
上述設定對不對

最後會問你要不要啟動hylafax,當然是要喔,不然先前玩心酸的丫

3. 接收傳真的設定

請在/etc/inittab 加入一行7:2345:respawn:/usr/sbin/faxgetty ttyS0 

#vi /etc/inittab

7:2345:respawn:/usr/sbin/faxgetty ttyS0

 

# init q

 

4. 設定whfc

先在fax server上設定fax帳號,當然在系統上也要有帳號喔

#useradd username

# faxadduser username

    1. 安裝whfcwindows 電腦,http://www.uli-eckhardt.de/whfc/ 官網下載免費的,安裝完成後執行whfc,再進行設定, fax選單中選user preferences 填入name:fax帳號,login: fax帳號,e-mail: fax帳號hylafax基本上是以E-MAIL來通知使用者你所交付傳真的狀況

       

    2. fax 選單中選system preferences 填入host name 可填入ip(裝有hylafaxlinux server) 以後使用列印到HP LaserJet IIIP PostScript Plus v2010.118(我測試結果這個型號的印表機轉成ps檔的字型比較好看) 印表機時會有呼叫whfc填入號碼就可以傳真了

       

5. 安裝印表機

 

新增印表機
xp
à HP LaserJet IIIP PostScript Plus v2010.118
port:WHFC FAX : (WHFC faxprinter port)

6. 傳真上方的Tagline變亂碼

 

#vi /var/spool/hylafax/etc/config.ttyS0

修改TagLineFormat: "From %%l | %F %T %Z | Page %%P of %%T"

 

TagLineFormat: "From %F %T %Z"

7. 收到的fax會擺在/var/spool/hylafax/recvq/裡,可以用samba分享給大家,另外系統也會把收到的fax轉成pdf寄給叫FaxMaster的帳號,你可以用mail alias來轉給需要的人

 

創作者介紹

Ben 的 IT 學習之不歸路網誌

ben88168 發表在 痞客邦 PIXNET 留言(0) 人氣()