前提:
需要一個usb fax modem,當作接收或傳送傳真使用
安裝完raspberry後,需開啟serial,可以使用下面指令或使用Desktop來做設定
sudo raspi-config

以下使用Desktop的raspi-config設定程式做解說
A..建議把Auto Login取消,增加安全性

B.開啟Serial,Fax Modem需要使用

C.設定Timezone及Locale等
Locale->ZH->TW(Taiwan)
Timezone->Asia->Taipei
Wifi Country->TW Taiwan

開始安裝HylaFAX,需要接收傳真可以安裝sendmail來把收到的傳真寄到某一個信箱去
1.upgrade pi,安裝完後會重開機
sudo apt-get update; sudo apt-get upgrade -y; sudo rpi-update; sudo reboot

2.安裝HylaFAX server及sendmail(不需接收傳真則不需安裝)
sudo apt-get install hylafax-server sendmail -y --force-yes
ps.如果顯示套件不存在,可以再執行一次sudo apt-get update

3.找到fax modem使用的COM port
find /sys/bus/usb/devices/usb*/ -name dev
找到ttyXXXX,先記錄起來,之後會使用(ttyACM0)

4.設定HylaFAX
sudo faxsetup

設定部份可以參考
基本上大都是enter就好了
其中Serial port that modem is connected to 輸入剛才查到的值ttyACM0

Country Code

看到以下選項時,要選擇no,不設定另一台fax modem
Do you want to run faxaddmodem to configure another modem [yes]?


設定完成,reboot一下
如果之後想改,可以到/var/spool/hylafax/etc/找到config.ACM0及config做修改
指令說明:
sendfax -n -d 傳真號碼 test.txt
-n 不加封面
-d 後面接傳真號碼
faxstat (顯示HylaFAX狀態)
faxstat -s (顯示傳真寄送狀態)
faxstat -r (顯示收到的傳真)
faxalter -a now jobid (某個jobid重傳)
faxrm jobid (刪除某一個jobid傳真)(需要傳送者本身才可以刪除)
client fax傳真需要使用帳密或是鎖定client IP二種方式擇一
A.鎖定client IP可以修改/var/spool/hylafax/etc/hosts.hfaxd來設定
B.增加帳號
sudo faxadduser -p passwd account
如果要刪除此刪號傳真job,需要在pi上建立account,然後利用
su - account faxrm jobid
如果要刪除帳號可以使用
faxdeluser account
5.設定sendmail(只送傳真,不接收者請skip,無驗證)
設定檔
sudo nano /etc/mail/sendmail.cf
建立一個FaxDispatch
sudo nano /var/spool/hylafax/etc/FaxDispatch
內容可以參考
## This is an example /etc/hylafax/FaxDispatch which shows you some ## of the features of the stock faxrcvd command. You should not ## use this file as is. For details, read faxrcvd(8). ## To route all incoming faxes in pdf to a single account. [email protected] [email protected] FILETYPE=pdf ## To do sender-based routing [from faxrcvd(8)] case "$SENDER" in *1*510*526*1212*) SENDTO=sam;; # Sam's test rig in Berkeley *1*415*390*1212*) SENDTO=raster@asd;; # 7L Xerox room, used for scanning *5107811212) SENDTO=peebles@mti;; # stuff from home esac case "$CIDNUMBER" in 435*) SENDTO=lee; FILETYPE=pdf;; # all faxes from area code 435 5059627777) SENDTO=amy; FILETYPE=tif;; # Amy wants faxes in TIFF esac case "$SUBADDR" in 53) SENDTO=FaxMaster;; # without double-notification roger) SENDTO=roger;; # possible text subaddressing esac ## To do device-based routing [from faxrcvd(8)] case "$DEVICE" in ttyACM0) [email protected];; # all faxes received on ttyS1 esac ## To make each received fax saved outside hylafax ## ( 別忘了 chown uucp /some/place ) /bin/cp $FILE /some/place ## To avoid bothering the faxmaster for each received fax NOTIFY_FAXMASTER=errors
參考資料
How to setup a fax server on a Raspberry Pi (rPi) 3 to recieve faxes – HylaFAX
Windows Client printer部份可以選用Winprint HylaFAX Reloaded就可以當成一台印表機傳真內容了
設定如附圖,可以利用Number capture,把傳真號碼放置在第一頁###041234567###,則可以自動帶入傳真號碼,如果又選用silently傳送,就可以沒有預覽自動傳送出去。

想問USB MODEM 的型號/購買LINK!
Thanks
https://goods.ruten.com.tw/item/show?21108119193253
這個可以用喔