Did some editing, got frustrated, started converting to linuxdoc-sgml
[Samba.git] / docs / textdocs / Faxing.txt
blob132a9f64ceb36028670f9fd93619c45e8319d398
1                 F A X I N G   with  S A M B A
3 This text describes how to turn your SAMBA-server into a fax-server
4 for any environment, especially for Windows.
5    Author: Gerhard Zuber <zuber@berlin.snafu.de>
7 Requirements:
8    UNIX box (Linux preferred) with SAMBA
9    ghostscript package
10    mgetty+sendfax package
11    pbm package (portable bitmap tools)
13 FTP sites:
14    mgetty099-May31.tar.gz
15    I got it from: ftp://ftp.gwdg.de/pub/linux/misc/mgetty/mgetty099-May31.tar.gz
18 making mgetty+sendfax running:
19 ==============================
21    go to source tree: /usr/src/mgetty+sendfax
22    cp policy.h-dist policy.h
24    change your settings: valid tty ports, modem initstring, Station-Id
26 #define MODEM_INIT_STRING       "AT &F S0=0 &D3 &K3 &C1\\\\N2"
28 #define FAX_STATION_ID  "49 30 12345678"
30 #define FAX_MODEM_TTYS  "ttyS1:ttyS2:ttyS3"
32    Modem initstring is for rockwell based modems
33    if you want to use mgetty+sendfax as PPP-dialin-server,
34    define AUTO_PPP in Makefile:
36 CFLAGS=-O2 -Wall -pipe -DAUTO_PPP
38    compile it and install the package.
39    edit your /etc/inittab and let mgetty running on your preferred
40    ports:
42 s3:45:respawn:/usr/local/sbin/mgetty ttyS2 vt100
44    now issue a
45       kill -HUP 1
46    and enjoy with the lightning LEDs on your modem
47    your now are ready to receive faxes !
50    if you want a PPP dialin-server, edit 
51       /usr/local/etc/mgetty+sendfax/login.config
53 /AutoPPP/ -     ppp     /usr/sbin/pppd auth debug passive modem 
57 Tools for printing faxes:
58 =========================
60    your incomed faxes are in:
61     /var/spool/fax/incoming
63    print it with:
65      for i in *
66      do
67      g3cat $i | g3tolj | lpr -P hp
68      done
70    g3cat is in the tools-section, g3tolj is in the contrib-section
71    for printing to HP lasers.
75 Now making the fax-server:
76 ===========================
78     fetch the file
79        mgetty+sendfax/frontends/winword/faxfilter
81     and place it in
83       /usr/local/etc/mgetty+sendfax/
85     prepare your faxspool file as mentioned in this file
86       /usr/local/bin/faxspool
88             if [ "$user" = "root" -o "$user" = "fax" -o \
89                  "$user" = "lp" -o "$user" = "daemon" -o "$user" = "bin" ]
91     make sure you have pbmtext (from the pbm-package). This is
92     needed for creaating the small header line on each page.
94     make sure your ghostscript is functional. You need fonts !
95     I prefer these from the OS/2 disks
98     prepare your faxheader
99       /usr/local/etc/mgetty+sendfax/faxheader
102     edit your /etc/printcap file:
104 # FAX 
105 lp3|fax:\
106         :lp=/dev/null:\
107         :sd=/usr/spool/lp3:\
108         :if=/usr/local/etc/mgetty+sendfax/faxfilter:sh:sf:mx#0:\
109         :lf=/usr/spool/lp3/fax-log:
114     edit your /usr/local/samba/lib/smb.conf
116     so you have a smb based printer named "fax"
120 The final step:
121 ===============
123     Now you have a printer called "fax" which can be used via
124     TCP/IP-printing (lpd-system) or via SAMBA (windows printing).
126     On every system you are able to produce postscript-files you
127     are ready to fax.
129     On Windows 3.1 95 and NT:
131     Install a printer wich produces postscript output,
132        e.g.  apple laserwriter
134     connect the "fax" to your printer 
137     Now write your first fax. Use your favourite wordprocessor,
138     write, winword, notepad or whatever you want, and start
139     with the headerpage.
141     Usually each fax has a header page. It carries your name,
142     your address, your phone/fax-number.
144     It carries also the recipient, his address and his *** fax
145     number ***. Now here is the trick:
147     Use the text:
148        Fax-Nr: 123456789
149     as the recipients fax-number. Make sure this text does not
150     occur in regular text ! Make sure this text is not broken
151     by formatting information, e.g. format it as a single entity.
153     The trick is that postscript output is human readable and
154     the faxfilter program scans the text for this pattern and
155     uses the found number as the fax-destination-number.
157     Now print your fax through the fax-printer and it will be
158     queued for later transmission. Use faxrunq for sending the
159     queue out.