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