Ellhniko Linux simple fax printer server mini-HOWTO (faxsrv-mini-HOWTO)

Erez Strauss <erez@newplaces.com> <mailto:ErezStrauss<erez@newplaces.com>> v1.0, 8 Noembrioy 1997

Xwris eggyhseis. Dekta ka8e eidoys sxolia. Ayto to eggrafo perigrafei me leptomereies enan apo tous aplousteroys tropoys gia na egkatasthsoyme enan diaxeiristh faj (fax server) sto sto Linux susthma sas. To faj einai dia8esimo gia toys xrhstes toy topikou host alla kai gia tous xrhstes diktuoy.

Contents

1 Eisagwgh 1

2 Erwthseis & Apanthseis 2 2.1 Ti einai enas diaxeirisths faj/ektypwths ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Pws na to egkatasthsete ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2.2.1 To logismiko hlektronikou faj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2.2 H kataxwrhsh sto printcap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2.3 H entolh faj (fax) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2.4 To arxeio /usr/bin/fax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2.5 O katalogos /var/spool/fax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2.6 To arxeio kleidwmatos (lock file). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2.7 To eidiko arxeio /dev/modem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2.8 O katalogos /var/lock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.3 Pws to xrhsimopoiw, gia ton server; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.4 Pou mporw na prosdiorisw ton ari8mo faj toy paralhpth? . . . . . . . . . . . . . . . . . . . . 4 2.5 Pws to xrhsimopoiw apo alla Unixes toy diktuoy ? . . . . . . . . . . . . . . . . . . . . . . . . 4 2.6 Caldera, Gia xrhstes toy LPRng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Teleytaia ekdosh, epikoinwnia me ton syggrafea. 5

1 Eisagwgh

Gia na ginei dynath h xrhsh enos faj/ektypwth, se susthma Linux,einai aparaithth h uparjh enos fax modem kai toy aparaithtoy logismikou. To programma Ektupwshs 8a xrhshmopoiei to logismiko faj san filtro ektupwshs. To hlektroniko faj 8a briskei ton ari8mo faj apo ton ari8mo ergasiwn ektupwshs kai sthn synexeia 8a stelnei to faj. To hlektroniko faj grafthke apo ton Ed Casas <edc@cce.com>. To ypoloipo keimeno einai grammeno ws Q&A

2 Erwthseis & Apanthseis

2.1 Ti einai enas diaxeirisths faj/ektypwths ;

Enas diaxeirhsths faj/ektypwths einai oysiastika mia egkatastash merikwn programmatwn: hlektroniko faj, kai o diaxeirisths ektypwsewn, me tetoio tropo wste h apostolh faj apo ena hlektroniko ypologisth einai toso aplh oso kai h apostolh mias ektupwtikhs ergasias se enan ektypwth.

2.2 Pws na to egkatasthsete ;

H egkatastash enos hlektronikou faj san diaxeiristh faj/ektypwth emperiexei merika problhmata Ustera apo arketes prospa8eies, apofasisa na mazecw ayth thn sofeia mesa se ena mikro-HOWTO. Ka8e eidoys sxolia ginontai dekta sthn dieu8ynsh <erez@newplaces.com>. Perigrafw edw, ta parapanw problhmata ka8ws kai oles tis odhgies stadiaka:

2.2.1 To logismiko hlektronikou faj

bebaiw8eite oti exete sthn katoxh sas to paketo toy hlektronikou faj.

Se susthma me yposthrijh RPM xrhsimopoihste thn entolh ’rpm -qv efax’.

Mporeite na parete ton phgaio kwdika toy hlektronikou faj se tar.gz format apo to sunsite: ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz h to rpm me ta ektelesima : ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm

2.2.2 H kataxwrhsh sto printcap.

H tekmhriwsh toy hlektronikou faj den exei to : sto telos ths kataxwrhshs sto printcap.

Lush: Pros8este thn akoloy8h kataxwrhsh /etc/printcap :

     fax:\
             :lp=/dev/null:\
             :sd=/var/spool/fax:\
             :if=/usr/bin/faxlpr:

2.2.3 H entolh faj (fax)

Xrhshmopoihste hard link kai oxi symbolikh sundesh (soft link) sthn entolh faj.

Trejte thn entolh:

     ln /usr/bin/fax /usr/bin/faxlpr

2.2.4 To arxeio /usr/bin/fax.

Kataxwrhste to /usr/bin/fax stis protimhseis:

Dialexte thn katalhllh Fax Class gia to montem:

     CLASS=2.0

8este to FROM=”your international phone number” pedio

     NAME="Your Name"

Pros8este thn grammh gia metatroph toy die8nous thlefwnikou ari8mou se topiko gia paradeigma sto Israhl 8a xrhsimopoiousate:

     TELCVT='sed -e s/+972/0/ -e s/+/00/'  # Israel

Yparxei ena problhma sto arxeio sthn grammh 586, allajte to cfile=... me tis akoloy8es duo grammes:

     cfile=`/usr/bin/tail -1 lock`
     cfile=`cat $cfile`

stis grammes 586,587 den 8a eprepe na yparxoyn ’-’ sumbola,oi grammes einai:

     0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;;
     *) echo "$l" | mail -s "fax to $num failed   " $user@$host ;;

2.2.5 O katalogos /var/spool/fax. Dhmioyrghste ton katalogo /var/spool/fax

     mkdir /var/spool/fax
     chmod 777 /var/spool/fax

2.2.6 To arxeio kleidwmatos (lock file). To arxeio kleidwmatos (/var/spool/fax/lock) exei dhmioyrgh8ei me lan8asmenes adeies, xrhsimopoihste thn akoloy8h entolh gia na to 8esete swsta:

     touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock

2.2.7 To eidiko arxeio /dev/modem. To programma hlektronikou faj perimenei ena arxeio pragmatikhs (real device file) sto /dev/modem kai den prokeitai na doylecei me symboliko link, kai etsi dhmioyrgoume ena arxeio syskeyhs me ton idio megisto (major) kai elaxisto (minor) ari8mo, ka8ws to /dev/cua? einai syndedemeno me to montem. To arxeio 8a prepei na exei mode to rw-rw-rw- wste na epitrepei se ka8e xrhsth na xrhsimopoiei to logismiko faj.

     ls -lL /dev/modem
     rm /dev/modem
     mknod /dev/modem c Mj Mi
     chmod 666 /dev/modem

To Mj einai 5, kai to Mi einai 64 gia to cua0, 65 gia to cua1 k.l.p. Gia paradeigma (gia to cua1):

     mknod /dev/modem c 5 65

2.2.8 O katalogos /var/lock. Allaje to mode ston katalogo /var/lock

     chmod 1777 /var/lock

2.3 Pws to xrhsimopoiw, gia ton server;

8a eprepe na xrhsimopoieite ton faj/ektypwth xrhsimopoiwntas thn epilogh -P kai thn epilogh -J me ton ari8mo toy faj.

xrhsimopoihste mia apo tis akoloy8es entoles lpr:

      lpr -Pfax -J <Fax-Number> [file-names]
      any command | lpr -Pfax -J <Fax-Number>

2.4 Pou mporw na prosdiorisw ton ari8mo faj toy paralhpth?

Meta apo thn epilogh -J.

2.5 Pws to xrhsimopoiw apo alla Unixes toy diktuoy ?

Pros8es8e thn akoloy8h kataxwrhsh mesa sto arxeio /etc/printcap kai ta client Linux systhmata, dhmioyrghste to spool directory, kai synexiste analoga ...

     fax:\
             :sd=/var/spool/fax:\
             :mx#0:\
             :sh:\
             :rm=host.domain:\
             :rp=fax:

pros8este to onoma twn client hosts sto /etc/hosts.lpd ths mhxanhs me poy dra ws diaxeirisths faj.

xrhsimopoihste to opws prohgoymenws.

Shmeiwsh:

H epikefalida thn opoia pros8etei to hlektroniko faj stis selides toy faj den allazei me bash to onoma toy xrhsth o opoios stelnei to faj. (mporei na enhmerw8ei).

2.6 Caldera, Gia xrhstes toy LPRng

To logismiko diaxeirishs ektypwsewn LPRng xrhsimopoiei mia diaforetikh me8odo gia na elegxei ton arxeio elegxoy.

Eyxaristies ston Luca Montecchiani <m.luca@usa.net>, o opoios brhke to problhma alla kai thn lush. Edw einai mia enhmerwsh tou arxeioy /usr/bin/fax. H akoloy8h grammh antika8ista tis duo aples grammes toy tupoy cfile=...>, stis grammes 586,587

     # Modified to work also with the LPRng package
     # Luca Montecchiani (08/11/97 m.luca@usa.net)
     if [ !-z "$CONTROL_FILE" ]
         then
             cfile=`cat tail -1 lock`
             cfile=`cat $cfile`
         else
             cfile=$CONTROL_FILE
     fi

3. Teleytaia ekdosh, epikoinwnia me ton syggrafea. 5

3 Teleytaia ekdosh, epikoinwnia me ton syggrafea.

Gia sxolia, parathrhseis, dior8wseis, enhmerwseis peri ths Ellhnikhs metafrashs aytou toy HOWTO, steilte email sthn Boula Sanida : voulariba@hellug.gr h ston Eyripidh Papakwsta : evris@hellug.gr kai enal-

laktika : ep@rocketmail.com

H teleytaia ekdosh aytou toy arxeioy mporei bre8ei mesw World Wide Web sta URLs

http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.sgml
http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.html
http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.txt
http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.info

Mporeite na epikoinwnhsete mazi moy

Erez Strauss
erez@newplaces.com
http://www.newplaces.com/linux/
http://www.newplaces.com/
Thlefwno: +972 52 739737
Faj:  +972 9 954 3034