1 Contributor: Gerhard Zuber <zuber@berlin.snafu.de>
5 Subject: F A X I N G with S A M B A
6 ==========================================================================
8 This text describes how to turn your SAMBA-server into a fax-server
9 for any environment, especially for Windows.
10 Author: Gerhard Zuber <zuber@berlin.snafu.de>
15 UNIX box (Linux preferred) with SAMBA and a faxmodem
17 mgetty+sendfax package
18 pbm package (portable bitmap tools)
21 sunsite.unc.edu:/pub/Linux/system/Serial/mgetty+sendfax*
22 tsx-11.mit.edu:/pub/linux/sources/sbin/mgetty+sendfax
23 ftp.leo.org:/pub/comp/networking/communication/modem/mgetty/mgetty1.1.6-May05.tar.gz
26 ftp.leo.org:/pub/comp/networking/communication/modem/mgetty/pbm10dec91.tgz
27 sunsite.unc.edu: ..../apps/graphics/convert/pbmplus-10dec91-bin.tar.gz
28 ftp.gwdg.de/pub/linux/grafik/pbmplus.src.tar.Z (this is 10dec91 source)
29 or ??? pbm10dec91.tgz pbmplus10dec91.tgz
32 making mgetty+sendfax running:
33 ==============================
35 go to source tree: /usr/src/mgetty+sendfax
36 cp policy.h-dist policy.h
38 change your settings: valid tty ports, modem initstring, Station-Id
40 #define MODEM_INIT_STRING "AT &F S0=0 &D3 &K3 &C1\\\\N2"
42 #define FAX_STATION_ID "49 30 12345678"
44 #define FAX_MODEM_TTYS "ttyS1:ttyS2:ttyS3"
46 Modem initstring is for rockwell based modems
47 if you want to use mgetty+sendfax as PPP-dialin-server,
48 define AUTO_PPP in Makefile:
50 CFLAGS=-O2 -Wall -pipe -DAUTO_PPP
52 compile it and install the package.
53 edit your /etc/inittab and let mgetty running on your preferred
56 s3:45:respawn:/usr/local/sbin/mgetty ttyS2 vt100
60 and enjoy with the lightning LEDs on your modem
61 your now are ready to receive faxes !
64 if you want a PPP dialin-server, edit
65 /usr/local/etc/mgetty+sendfax/login.config
67 /AutoPPP/ - ppp /usr/sbin/pppd auth debug passive modem
70 Note: this package automatically decides between a fax call and
71 a modem call. In case of modem call you get a login prompt !
73 Tools for printing faxes:
74 =========================
76 your incomed faxes are in:
77 /var/spool/fax/incoming
83 g3cat $i | g3tolj | lpr -P hp
86 in case of low resolution use instead:
88 g3cat $i | g3tolj -aspect 2 | lpr -P hp
91 g3cat is in the tools-section, g3tolj is in the contrib-section
92 for printing to HP lasers.
94 If you want to produce files for displaying and printing with Windows, use
95 some tools from the pbm-package like follow
97 g3cat $i | g3topbm - | ppmtopcx - >$i.pcx
99 and view it with your favourite Windows tool (maybe paintbrush)
102 Now making the fax-server:
103 ===========================
106 mgetty+sendfax/frontends/winword/faxfilter
110 /usr/local/etc/mgetty+sendfax/
112 prepare your faxspool file as mentioned in this file
113 edit fax/faxspool.in and reinstall or change the final
114 /usr/local/bin/faxspool too.
116 if [ "$user" = "root" -o "$user" = "fax" -o \
117 "$user" = "lp" -o "$user" = "daemon" -o "$user" = "bin" ]
119 find the first line and change the second.
121 make sure you have pbmtext (from the pbm-package). This is
122 needed for creating the small header line on each page.
124 Some peoples had problems with precompiled binaries (especially
125 at linux) with a shared lib libgr.so.x.x. The better way is
126 to fetch the source and compile it. One needs only pbmtext for
127 generating the small line on top of each page /faxheader). Install
128 only the individual programs you need. If you install the full
129 package then install pbmplus first and then mgetty+sendfax, because
130 this package has some changed programs by itself (but not pbmtext).
132 make sure your ghostscript is functional. You need fonts !
133 I prefer these from the OS/2 disks
135 prepare your faxheader
136 /usr/local/etc/mgetty+sendfax/faxheader
138 edit your /etc/printcap file:
144 :if=/usr/local/etc/mgetty+sendfax/faxfilter:sh:sf:mx#0:\
145 :lf=/usr/spool/lp3/fax-log:
150 edit your /usr/local/samba/lib/smb.conf
152 so you have a smb based printer named "fax"
158 Now you have a printer called "fax" which can be used via
159 TCP/IP-printing (lpd-system) or via SAMBA (windows printing).
161 On every system you are able to produce postscript-files you
164 On Windows 3.1 95 and NT:
166 Install a printer wich produces postscript output,
167 e.g. apple laserwriter
169 connect the "fax" to your printer
172 Now write your first fax. Use your favourite wordprocessor,
173 write, winword, notepad or whatever you want, and start
176 Usually each fax has a header page. It carries your name,
177 your address, your phone/fax-number.
179 It carries also the recipient, his address and his *** fax
180 number ***. Now here is the trick:
184 as the recipients fax-number. Make sure this text does not
185 occur in regular text ! Make sure this text is not broken
186 by formatting information, e.g. format it as a single entity.
187 (Windows Write and Win95 Wordpad are functional, maybe newer
188 versions of Winword are breaking formatting information).
190 The trick is that postscript output is human readable and
191 the faxfilter program scans the text for this pattern and
192 uses the found number as the fax-destination-number.
194 Now print your fax through the fax-printer and it will be
195 queued for later transmission. Use faxrunq for sending the
198 Notes of SAMBA smb.conf:
199 Simply use fall through from the samba printer to the unix
203 printcap name = /etc/printcap
204 print command = /usr/bin/lpr -r -P %p %s
205 lpq command = /usr/bin/lpq -P %p
206 lprm command = /usr/bin/lprm -P %p %j
210 comment = FAX (mgetty+sendfax)