1 diff -Nur efax-0.9.orig/Makefile efax-0.9/Makefile
2 --- efax-0.9.orig/Makefile Tue Apr 13 10:10:52 1999
3 +++ efax-0.9/Makefile Tue Apr 13 10:11:01 1999
11 # Change the following to the destination directories for
12 # binaries and man pages. Probably /usr/bin and /usr/man on
13 diff -Nur efax-0.9.orig/efax.conf efax-0.9/efax.conf
14 --- efax-0.9.orig/efax.conf Thu Jan 1 01:00:00 1970
15 +++ efax-0.9/efax.conf Tue Apr 13 10:18:50 1999
17 +# --- Start of user configuration section ---
21 +# - do not put spaces before or after the equal (=) signs.
23 +# - variables can also be set on the command line, for example:
24 +# fax DEV=cua0 send file.ps
25 +# or in a configuration file (see CONFIGFILES below)
28 +# The names of the fax script, efax and efix, including full path
35 +# The device to which the fax modem is connected (e.g. ttya for
36 +# /dev/ttya). Use a dial-out (cua) device if available. If
37 +# there are links to this device then all programs must use same
38 +# name or the UUCP locking mechanism will fail. For example, if
39 +# /dev/modem is a link to /dev/cua1, then getty, uucp, kermit,
40 +# pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1.
44 +# Your fax number in international format, 20 characters maximum.
45 +# Use only digits, spaces, and the "+" character.
47 +FROM="+0 000 000 0000"
49 +# Your name as it should appear on the page header.
51 +NAME="from PLD system"
53 +# The preferred page size for creating and printing faxes.
54 +# Allowed values are "letter", "legal", and "a4".
60 +# The type of printer. Use 'pcl' for HP-PCL or 'ps' for
61 +# Postscript. See definition of PRINT (below) for more options.
63 +PRTYPE=ps # Postscript (e.g. Apple LaserWriter)
64 +# PRTYPE=pcl # HP-PCL (e.g. HP LaserJet)
66 +# The command to print image files from standard input. Typically
67 +# this is "lpr" or "lp".
71 +# The command to view a Portable Gray Map (PGM) image from the
72 +# standard input. Typically "xv -" or "xloadimage stdin".
74 +VIEWCMD="xloadimage stdin" # best
75 +# VIEWCMD="pnmtoxwd | xwud" # slower alternative
76 +# VIEWCMD="xv -" # much slower alternative
78 +# The name of the Ghostscript executable including full path if
79 +# necessary. Only required if faxing Postscript files.
83 +# Dial string prefix and suffix such as T for tone dialing, P for
84 +# pulse dialing, 9 to get an external line, commas for delays or
85 +# W to wait for dial tone. See definition of TELCVT below if you
86 +# have more complex requirements.
91 +# The name(s) of lock file(s) according to your system's
92 +# conventions. Protect with single quotes for delayed evaluation.
93 +# Add a leading '#' to the file name to use binary format.
95 +LOCK='-x /var/lock/LCK..$DEV' # modern systems
96 +# LOCK='-x /usr/spool/uucp/LCK..$DEV' # older systems
97 +# LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both
98 +# LOCK='-x #/usr/spool/uucp/LCK..$DEV' # binary format
99 +# LOCK='-x /usr/spool/locks/LK.047.040.011' # SysV style names
100 +# LOCK='' # no lock file
102 +# Uncomment one of the following lines to force xon/xoff flow
103 +# control only if you have one of the types of modems listed.
105 +# FCINIT='-j\Q4' # AT&T (Dataport, Paradyne)
106 +# FCINIT='-j\Q1' # Motorola (Power Modem, 3400 Pro,...)
107 +# FCINIT='-j*F1' # QuickComm (Spirit II)
108 +# FCINIT='-j&H2' # USR (Courier, Sportster)
109 +# FCINIT='-or' # Multi-Tech (for bit reversal)
111 +# ****************************************************************
112 +# The remaining options probably won't need to be changed.
113 +# ****************************************************************
115 +# Configuration files that are sourced if they exist. Comment
116 +# out if you don't need to use config files. Warning: any type of
117 +# shell command in these files will be executed.
119 +CONFIGFILES="/etc/efax.rc ${HOME:-~}/.efaxrc ./.efaxrc"
121 +# A command that will generate unique names for logs and received
122 +# files. 'date +%m%d%H%M%S' works on most systems. Protect with
125 +TSTAMP='date +%m%d%H%M%S'
126 +# TSTAMP='echo $$' # alternative - use process number
128 +# Shell command to convert aliases to phone numbers when sending
129 +# faxes. When executed $1 will be the alias and $f the file name
130 +# to search. The example below uses a directory file where alias
131 +# lines start with the keyword "fax" followed by the alias in
132 +# parentheses and a colon. The remainder of the line is taken to
133 +# be the phone number. Other lines are ignored. For example, if
134 +# one of the files in DIRFILES (defined below) contained the line
135 +# "fax(kpmg): 691-3031", you could use the command "fax send kpmg
136 +# invoice.24". Protect with single quotes.
138 +LOOKUP='eval sed -n -e "/^fax($1):/{" -e "s/^[^:]*://p" -eq -e"}" $f'
140 +# List of telephone directory file(s) to be searched. The
141 +# default is the file .faxdir in the user's home directory.
143 +DIRFILES="${HOME:-.}/.faxdir"
145 +# Shell command to convert phone numbers to dial strings. This
146 +# lets you to store numbers without the long distance or
147 +# alternate carrier access codes, passwords, accounting digits,
148 +# etc. In the examples below this is used to convert numbers
149 +# beginning with '+'; the first substitution handles same-country
150 +# calls and the second handles international calls.
152 +TELCVT='sed -e s/+48/0/ -e s/+/00/' # Polish
153 +# TELCVT='sed -e s/+1/1/ -e s/+/011/' # North America
154 +# TELCVT='sed -e s/+61/0/ -e s/+/0011/' # Australia
155 +# TELCVT='sed -e s/+44/0/ -e s/+/00/' # UK
156 +# TELCVT='sed -e s/+49/0/ -e s/+/00/' # Germany
157 +# TELCVT='sed -e s/+852// -e s/+/001/' # Hong Kong
158 +# TELCVT='sed -e s/+33// -e s/+/19W/' # France (?)
159 +# TELCVT='sed -e s/+34/0/ -e s/+/07W/' # Spain
160 +# TELCVT='sed -e s/+1/10288/' # use AT&T
161 +# TELCVT='sed -e s/+/T82W1682W9W/' # get out of PBX
163 +# efix options to use a bitmap font for text-to-fax conversion.
164 +# The option -l66 puts 66 lines of text per page, -d1,1 sets 1
165 +# inch top & left margin. Comment these out to use the built-in
166 +# font. Use "fax makefont" to make bitmap fonts from Postscript
169 +# TEXTFONT="-l66 -d1,1 -f /usr/bin/efaxfont"
171 +# efax options to specify a different font for headers. Generate
172 +# using "fax makefont."
174 +# HDRFONT="-f /usr/bin/efaxfont"
176 +# Dimensions of page sizes.
178 +PAGE_letter="8.465x11in" # fax width x letter length
179 +PAGE_legal="8.465x14in" # fax width x legal length
180 +PAGE_a4="21x29.7cm" # ISO A4
182 +# Default resolution for converting to fax format. Can only be
183 +# 204x196 or 204x98.
185 +RES=204x196 # default "Fine" resolution (196 lpi)
186 +# RES=204x98 # standard resolution (98 lpi)
188 +# When the print and view commands below are executed, $f will be
189 +# the input file name and $PAGEDIM will be one of the above page
190 +# dimensions. Protect with single quotes.
192 +# PRINT: A command to convert fax files to a printable format.
193 +# For printers other than Postscript or PCL you can use efix's
194 +# PBM output and an appropriate pbm filter (such as pbmtoepson)
195 +# or efix's Postsript output and Ghostscript as a filter. Change
196 +# the scaling (-s) and displacement (-d) options as required to
197 +# fit the image onto the area your printer can print.
199 +PRINT='$EFIX -ve -p$PAGEDIM -r300 -s0.98 -d0,0.125 -o$PRTYPE $f'
201 +# example using pbm utilities:
202 +# PRINT='$EFIX -ve -p$PAGEDIM -r60x72 -opbm $f | pbmtoepson'
204 +# example using Ghostscript:
205 +# PRINT='$EFIX -ve -p$PAGEDIM -r120x144 -ops $f | \
206 +# $GS -q -sPAPERSIZE=$PAGE -sDEVICE=epson -r120x144 \
207 +# -dNOPAUSE -dSAFER -sOutputFile=- - '
209 +# VIEW: A command to convert fax files to PGM format for
210 +# previewing. efix's pgm output reduces image dimensions by 4X.
212 +# VIEW='$EFIX -ve -p$PAGEDIM -r200 -opgm $f' # 50dpi: fast, whole-page view
213 +VIEW='$EFIX -ve -p$PAGEDIM -r300 -opgm $f' # 75dpi: slower, readable size
215 +# Commands to set up modem. "-iZ -i&FE&D2S7=120 -i&C0"
216 +# works with almost all modems. See the efax(1) man page for
219 +INIT="-iZ -i&FE&D2S7=120 -i&C0"
221 +# Command(s) to reset modem when efax finishes. "-kZ" works in
225 +# RESET="-kZ -k&F+FCLASS=0" # for modems that stay in fax mode after reset
227 +# Speaker mode(M) and loudness(L). Mn sets speaker mode where n
228 +# means: 0:never, 1:until carrier, 2:always, 3:on receive only.
232 +# Options to use a particular command sets. Normally efax
233 +# selects the command set based on the modem's capabilities. Use
234 +# -o1 to force Class 1, -o2 for Class 2 and -o0 for Class 2.0.
236 +# CLASSINIT="-o1" # Class 1
237 +# CLASSINIT="" # Class 2
238 +# CLASSINIT="-o0" # Class 2.0
240 +# The modem's capabilities for sending faxes. Normally efax
241 +# chooses these by querying the modem. "-c 1,3,0,0,0,0,0,0"
242 +# forces 9600 bps maximum speed. See the efax(1) man page for a
243 +# description of the fields.
245 +# TXCAP="-c 1,3,0,2,0,0,0,0"
247 +# Capabilities for receiving faxes. Usually the same as TXCAP.
248 +# If your modem only receives at 4800 bps use "-c 1,1,0,0,0,0,0,0".
252 +# Additional options required only for transmit or only for
253 +# receive. None normally required.
258 +# Command to make a date for the page header. Protect with single
259 +# quotes. 'date "+%Y/%m/%d %H:%M"' works on most systems.
261 +DATECMD='date "+%Y/%m/%d %H:%M"' # YYYY/MM/DD HH:MM (24hour)
262 +# DATECMD='date' # longer, more readable
264 +# Page header format. You may use $DATE, $NAME, $FROM, $TO, and
265 +# "%d/%d" (for page number and count). Protect with single
266 +# quotes. Example: '$DATE $FROM $NAME p. %d/%d'.
268 +HDR='$DATE $FROM $NAME p. %d/%d'
270 +# BUSYRETRIES is a list of delays in seconds between attempts to
271 +# redial busy numbers. Comment out if you don't want to retry
274 +BUSYRETRIES="30 60 120 300 60 600 60 60 1200 60 60"
276 +# FAILRETRIES is a list of delays in seconds between attempts to
277 +# retry failed transmissions. Retries are only attempted if at
278 +# least one page was sent in the previous attempt. Retries
279 +# include only pages not already sent. Comment out if you don't
280 +# want to retry failed transmissions.
282 +FAILRETRIES="300 300" # try two more times at 5 minute intervals
284 +# Command to run another program (efax) at a higher-than-normal
285 +# scheduling priority. This command isn't used if it fails
286 +# (e.g. because the current user isn't privileged). Comment this
287 +# out if it causes problems.
291 +# Standard versions of commands that are often aliased.
296 +# Messages to display. VERB sets the messages displayed (stderr)
297 +# and VERBLOG the messages written to log files (stdout).
299 +VERB="ewin" # show errors, warnings, progress & negotiation
300 +VERBLOG="chewmainrxtf" # log everything
302 +# ****************************************************************
303 +# The remaining configuration options apply only to the `fax
304 +# answer' command. You can ignore these if you will only be
305 +# running efax manually. See "USING INIT TO RUN EFAX" in the
306 +# efax man page for more information.
307 +# ****************************************************************
309 +# device or file where fatal error messages should be written
311 +CONSOLE=/dev/console
313 +# The directory to store incoming faxes and log files. This directory
314 +# should already exist and be writable by the user(s) of this script.
316 +FAXDIR=/var/spool/fax
319 +# The strftime(3) pattern that generates the file name for
320 +# received files. For example, at 10:45:36 on February 25,
321 +# "%m%d%H%M%S" would produce 0225104536, "%j-%H%M" would produce
322 +# 056-1045, and %d%b%H%M 25Feb1045.
324 +ANSFNAME="%m%d%H%M%S"
326 +# umask for received files. Use 022 to allow anyone to retrieve faxes.
330 +# The user to be sent mail when a fax is received.
334 +# The sendmail executable including full path if necessary. Only
335 +# required if forwarding received faxes by e-mail in $NOTIFY.
337 +SENDMAIL=/usr/sbin/sendmail
339 +# The command to execute when a fax is received. Normally this
340 +# sends FAXMGR e-mail or prints the received fax. The variable
341 +# $f will be the name of the log file, $FILES will contain the
342 +# names of the received files, and $REMID will have the remote ID
343 +# string or '?' if none. The faxmail function will e-mail the fax
344 +# as MIME image/tiff attachments. Comment this out to do
345 +# nothing. Protect with single quotes.
347 +NOTIFY='faxmail "$REMID" "$f" $FILES | $SENDMAIL $FAXMGR'
348 +# NOTIFY='mail -s "fax/message from $REMID: $FILES" $FAXMGR <$f'
349 +# NOTIFY='lpr $f ; $FAX print $OPT $FILES'
351 +# The number of rings to wait before answering.
355 +# If you want to enable fax/data adaptive answer (AA) read the
356 +# efax man page and define DATAINIT to be the options that enable
357 +# AA. Note: AA does not work properly on some (2400/9600) modems
358 +# unless the modem initialization is done at 2400 bps (not
359 +# possible with efax). USR modems do not support modem adaptive
360 +# answer (+FAE=) in Class 1. &C1 enables most modems' DCD line
361 +# so a signal can be sent to shells when a call is dropped. You
362 +# must also define DCMD (see below).
364 +DATAOPT="-j&C1 -j+FCLASS=0 -jS7=30"
365 +# DATAINIT="$DATAOPT -j+FAE=1" # Class 1 modem adaptive answer
366 +# DATAINIT="$DATAOPT -j+FAA=1" # Class 2[.0] modem adaptive answer
367 +# DATAINIT="$DATAOPT -oa" # software adaptive answer
368 +# DATAINIT="$DATAOPT" # data-only answer
370 +# If you have a voice modem and want to answer in voice mode
371 +# define VOICEINIT to be the options that enable voice mode. You
372 +# must also set VCMD below. Voice support is not yet available.
374 +# VOICEINIT="-j#CLS=8" # Rockwell voice modems
375 +# VOICEINIT="-jM2L2#CLS=8#VLS=4" # with speaker on
377 +# Argument to exec(2) of "/bin/sh -c" for incoming data calls.
378 +# This command will usually exec getty(8) but can include other
379 +# commands to set up the serial port, etc. Up to 6 %d arguments
380 +# are replaced by the baud rate following the CONNECT response
381 +# from the modem or 19200 if none. If using getty_ps ensure
382 +# /etc/gettydefs has entries for all possible %d values
383 +# (e.g. 19200). Use 'nice' if required to reduce any special
384 +# priority set by NICE.
386 +DCMD="exec /sbin/getty -h $DEV %d vt100" # for getty_ps (Linux)
387 +# DCMD="exec /sbin/agetty -h $DEV %d vt100" # for agetty (Linux)
388 +# DCMD="exec pppd $DEV %d" # start PPP server
390 +# Argument to exec(2) of "/bin/sh -c" for incoming voice calls.
391 +# This command will usually be a shell script that interacts with
392 +# the caller by using efone to play/record audio and detect DTMF
393 +# tones. Up to 6 %d arguments are replaced by the modem file
394 +# descriptor. VCMD can "exec fax reanswer" to switch to fax or
395 +# data mode if required.
397 +FONE=/usr/bin/fone # minimal voice mail
398 +VCMD="exec $FONE %d"
400 +# The owner.group and mode to which "fax answer" sets the serial
401 +# device. This allows non-root processes to grab the device from
402 +# efax even if a previous process (e.g. login) has changed it.
403 +# Comment out if you don't need to reset device ownership.
405 +OWNER=root.tty # typical
407 +# MODE=660 # only owner & group
409 +# Regular expression for efax exit codes in log files that will
410 +# *not* be saved. For example, use [145] to ignore exits due to
411 +# `locked' (1), `no modem' (4), and `signal' (5) conditions
415 +# ****************************************************************
416 +# --- End of user configuration section ---
417 +# ****************************************************************
418 diff -Nur efax-0.9.orig/efaxio.c efax-0.9/efaxio.c
419 --- efax-0.9.orig/efaxio.c Tue Apr 13 10:10:52 1999
420 +++ efax-0.9/efaxio.c Tue Apr 13 10:11:01 1999
427 #include "efaxio.h" /* EFAX */
429 diff -Nur efax-0.9.orig/fax efax-0.9/fax
430 --- efax-0.9.orig/fax Tue Apr 13 10:10:52 1999
431 +++ efax-0.9/fax Tue Apr 13 10:16:11 1999
433 # fax - script to make, send, receive, view or print a fax
434 # Copyright 1993-1999 by Ed Casas
436 -# --- Start of user configuration section ---
440 -# - do not put spaces before or after the equal (=) signs.
442 -# - variables can also be set on the command line, for example:
443 -# fax DEV=cua0 send file.ps
444 -# or in a configuration file (see CONFIGFILES below)
447 -# The names of the fax script, efax and efix, including full path
454 -# The device to which the fax modem is connected (e.g. ttya for
455 -# /dev/ttya). Use a dial-out (cua) device if available. If
456 -# there are links to this device then all programs must use same
457 -# name or the UUCP locking mechanism will fail. For example, if
458 -# /dev/modem is a link to /dev/cua1, then getty, uucp, kermit,
459 -# pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1.
463 -# Your fax number in international format, 20 characters maximum.
464 -# Use only digits, spaces, and the "+" character.
466 -FROM="+1 800 555 5555"
468 -# Your name as it should appear on the page header.
470 -NAME="Put Your Name Here"
472 -# The preferred page size for creating and printing faxes.
473 -# Allowed values are "letter", "legal", and "a4".
479 -# The type of printer. Use 'pcl' for HP-PCL or 'ps' for
480 -# Postscript. See definition of PRINT (below) for more options.
482 -PRTYPE=ps # Postscript (e.g. Apple LaserWriter)
483 -# PRTYPE=pcl # HP-PCL (e.g. HP LaserJet)
485 -# The command to print image files from standard input. Typically
486 -# this is "lpr" or "lp".
490 -# The command to view a Portable Gray Map (PGM) image from the
491 -# standard input. Typically "xv -" or "xloadimage stdin".
493 -VIEWCMD="xloadimage stdin" # best
494 -# VIEWCMD="pnmtoxwd | xwud" # slower alternative
495 -# VIEWCMD="xv -" # much slower alternative
497 -# The name of the Ghostscript executable including full path if
498 -# necessary. Only required if faxing Postscript files.
502 -# Dial string prefix and suffix such as T for tone dialing, P for
503 -# pulse dialing, 9 to get an external line, commas for delays or
504 -# W to wait for dial tone. See definition of TELCVT below if you
505 -# have more complex requirements.
510 -# The name(s) of lock file(s) according to your system's
511 -# conventions. Protect with single quotes for delayed evaluation.
512 -# Add a leading '#' to the file name to use binary format.
514 -LOCK='-x /var/lock/LCK..$DEV' # modern systems
515 -# LOCK='-x /usr/spool/uucp/LCK..$DEV' # older systems
516 -# LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both
517 -# LOCK='-x #/usr/spool/uucp/LCK..$DEV' # binary format
518 -# LOCK='-x /usr/spool/locks/LK.047.040.011' # SysV style names
519 -# LOCK='' # no lock file
521 -# Uncomment one of the following lines to force xon/xoff flow
522 -# control only if you have one of the types of modems listed.
524 -# FCINIT='-j\Q4' # AT&T (Dataport, Paradyne)
525 -# FCINIT='-j\Q1' # Motorola (Power Modem, 3400 Pro,...)
526 -# FCINIT='-j*F1' # QuickComm (Spirit II)
527 -# FCINIT='-j&H2' # USR (Courier, Sportster)
528 -# FCINIT='-or' # Multi-Tech (for bit reversal)
530 -# ****************************************************************
531 -# The remaining options probably won't need to be changed.
532 -# ****************************************************************
534 -# Configuration files that are sourced if they exist. Comment
535 -# out if you don't need to use config files. Warning: any type of
536 -# shell command in these files will be executed.
538 -CONFIGFILES="/etc/efax.rc ${HOME:-~}/.efaxrc ./.efaxrc"
540 -# A command that will generate unique names for logs and received
541 -# files. 'date +%m%d%H%M%S' works on most systems. Protect with
544 -TSTAMP='date +%m%d%H%M%S'
545 -# TSTAMP='echo $$' # alternative - use process number
547 -# Shell command to convert aliases to phone numbers when sending
548 -# faxes. When executed $1 will be the alias and $f the file name
549 -# to search. The example below uses a directory file where alias
550 -# lines start with the keyword "fax" followed by the alias in
551 -# parentheses and a colon. The remainder of the line is taken to
552 -# be the phone number. Other lines are ignored. For example, if
553 -# one of the files in DIRFILES (defined below) contained the line
554 -# "fax(kpmg): 691-3031", you could use the command "fax send kpmg
555 -# invoice.24". Protect with single quotes.
557 -LOOKUP='eval sed -n -e "/^fax($1):/{" -e "s/^[^:]*://p" -eq -e"}" $f'
559 -# List of telephone directory file(s) to be searched. The
560 -# default is the file .faxdir in the user's home directory.
562 -DIRFILES="${HOME:-.}/.faxdir"
564 -# Shell command to convert phone numbers to dial strings. This
565 -# lets you to store numbers without the long distance or
566 -# alternate carrier access codes, passwords, accounting digits,
567 -# etc. In the examples below this is used to convert numbers
568 -# beginning with '+'; the first substitution handles same-country
569 -# calls and the second handles international calls.
571 -TELCVT='sed -e s/+1/1/ -e s/+/011/' # North America
572 -# TELCVT='sed -e s/+61/0/ -e s/+/0011/' # Australia
573 -# TELCVT='sed -e s/+44/0/ -e s/+/00/' # UK
574 -# TELCVT='sed -e s/+49/0/ -e s/+/00/' # Germany
575 -# TELCVT='sed -e s/+852// -e s/+/001/' # Hong Kong
576 -# TELCVT='sed -e s/+33// -e s/+/19W/' # France (?)
577 -# TELCVT='sed -e s/+34/0/ -e s/+/07W/' # Spain
578 -# TELCVT='sed -e s/+1/10288/' # use AT&T
579 -# TELCVT='sed -e s/+/T82W1682W9W/' # get out of PBX
581 -# efix options to use a bitmap font for text-to-fax conversion.
582 -# The option -l66 puts 66 lines of text per page, -d1,1 sets 1
583 -# inch top & left margin. Comment these out to use the built-in
584 -# font. Use "fax makefont" to make bitmap fonts from Postscript
587 -# TEXTFONT="-l66 -d1,1 -f /usr/bin/efaxfont"
589 -# efax options to specify a different font for headers. Generate
590 -# using "fax makefont."
592 -# HDRFONT="-f /usr/bin/efaxfont"
594 -# Dimensions of page sizes.
596 -PAGE_letter="8.465x11in" # fax width x letter length
597 -PAGE_legal="8.465x14in" # fax width x legal length
598 -PAGE_a4="21x29.7cm" # ISO A4
600 -# Default resolution for converting to fax format. Can only be
601 -# 204x196 or 204x98.
603 -RES=204x196 # default "Fine" resolution (196 lpi)
604 -# RES=204x98 # standard resolution (98 lpi)
606 -# When the print and view commands below are executed, $f will be
607 -# the input file name and $PAGEDIM will be one of the above page
608 -# dimensions. Protect with single quotes.
610 -# PRINT: A command to convert fax files to a printable format.
611 -# For printers other than Postscript or PCL you can use efix's
612 -# PBM output and an appropriate pbm filter (such as pbmtoepson)
613 -# or efix's Postsript output and Ghostscript as a filter. Change
614 -# the scaling (-s) and displacement (-d) options as required to
615 -# fit the image onto the area your printer can print.
617 -PRINT='$EFIX -ve -p$PAGEDIM -r300 -s0.98 -d0,0.125 -o$PRTYPE $f'
619 -# example using pbm utilities:
620 -# PRINT='$EFIX -ve -p$PAGEDIM -r60x72 -opbm $f | pbmtoepson'
622 -# example using Ghostscript:
623 -# PRINT='$EFIX -ve -p$PAGEDIM -r120x144 -ops $f | \
624 -# $GS -q -sPAPERSIZE=$PAGE -sDEVICE=epson -r120x144 \
625 -# -dNOPAUSE -dSAFER -sOutputFile=- - '
627 -# VIEW: A command to convert fax files to PGM format for
628 -# previewing. efix's pgm output reduces image dimensions by 4X.
630 -# VIEW='$EFIX -ve -p$PAGEDIM -r200 -opgm $f' # 50dpi: fast, whole-page view
631 -VIEW='$EFIX -ve -p$PAGEDIM -r300 -opgm $f' # 75dpi: slower, readable size
633 -# Commands to set up modem. "-iZ -i&FE&D2S7=120 -i&C0"
634 -# works with almost all modems. See the efax(1) man page for
637 -INIT="-iZ -i&FE&D2S7=120 -i&C0"
639 -# Command(s) to reset modem when efax finishes. "-kZ" works in
643 -# RESET="-kZ -k&F+FCLASS=0" # for modems that stay in fax mode after reset
645 -# Speaker mode(M) and loudness(L). Mn sets speaker mode where n
646 -# means: 0:never, 1:until carrier, 2:always, 3:on receive only.
650 -# Options to use a particular command sets. Normally efax
651 -# selects the command set based on the modem's capabilities. Use
652 -# -o1 to force Class 1, -o2 for Class 2 and -o0 for Class 2.0.
654 -# CLASSINIT="-o1" # Class 1
655 -# CLASSINIT="" # Class 2
656 -# CLASSINIT="-o0" # Class 2.0
658 -# The modem's capabilities for sending faxes. Normally efax
659 -# chooses these by querying the modem. "-c 1,3,0,0,0,0,0,0"
660 -# forces 9600 bps maximum speed. See the efax(1) man page for a
661 -# description of the fields.
663 -# TXCAP="-c 1,3,0,2,0,0,0,0"
665 -# Capabilities for receiving faxes. Usually the same as TXCAP.
666 -# If your modem only receives at 4800 bps use "-c 1,1,0,0,0,0,0,0".
670 -# Additional options required only for transmit or only for
671 -# receive. None normally required.
676 -# Command to make a date for the page header. Protect with single
677 -# quotes. 'date "+%Y/%m/%d %H:%M"' works on most systems.
679 -DATECMD='date "+%Y/%m/%d %H:%M"' # YYYY/MM/DD HH:MM (24hour)
680 -# DATECMD='date' # longer, more readable
682 -# Page header format. You may use $DATE, $NAME, $FROM, $TO, and
683 -# "%d/%d" (for page number and count). Protect with single
684 -# quotes. Example: '$DATE $FROM $NAME p. %d/%d'.
686 -HDR='$DATE $FROM $NAME p. %d/%d'
688 -# BUSYRETRIES is a list of delays in seconds between attempts to
689 -# redial busy numbers. Comment out if you don't want to retry
692 -BUSYRETRIES="30 60 120 300 60 600 60 60 1200 60 60"
694 -# FAILRETRIES is a list of delays in seconds between attempts to
695 -# retry failed transmissions. Retries are only attempted if at
696 -# least one page was sent in the previous attempt. Retries
697 -# include only pages not already sent. Comment out if you don't
698 -# want to retry failed transmissions.
700 -FAILRETRIES="300 300" # try two more times at 5 minute intervals
702 -# Command to run another program (efax) at a higher-than-normal
703 -# scheduling priority. This command isn't used if it fails
704 -# (e.g. because the current user isn't privileged). Comment this
705 -# out if it causes problems.
709 -# Standard versions of commands that are often aliased.
714 -# Messages to display. VERB sets the messages displayed (stderr)
715 -# and VERBLOG the messages written to log files (stdout).
717 -VERB="ewin" # show errors, warnings, progress & negotiation
718 -VERBLOG="chewmainrxtf" # log everything
720 -# ****************************************************************
721 -# The remaining configuration options apply only to the `fax
722 -# answer' command. You can ignore these if you will only be
723 -# running efax manually. See "USING INIT TO RUN EFAX" in the
724 -# efax man page for more information.
725 -# ****************************************************************
727 -# device or file where fatal error messages should be written
729 -CONSOLE=/dev/console
731 -# The directory to store incoming faxes and log files. This directory
732 -# should already exist and be writable by the user(s) of this script.
734 -FAXDIR=/var/spool/fax
737 -# The strftime(3) pattern that generates the file name for
738 -# received files. For example, at 10:45:36 on February 25,
739 -# "%m%d%H%M%S" would produce 0225104536, "%j-%H%M" would produce
740 -# 056-1045, and %d%b%H%M 25Feb1045.
742 -ANSFNAME="%m%d%H%M%S"
744 -# umask for received files. Use 022 to allow anyone to retrieve faxes.
748 -# The user to be sent mail when a fax is received.
752 -# The sendmail executable including full path if necessary. Only
753 -# required if forwarding received faxes by e-mail in $NOTIFY.
755 -SENDMAIL=/usr/sbin/sendmail
757 -# The command to execute when a fax is received. Normally this
758 -# sends FAXMGR e-mail or prints the received fax. The variable
759 -# $f will be the name of the log file, $FILES will contain the
760 -# names of the received files, and $REMID will have the remote ID
761 -# string or '?' if none. The faxmail function will e-mail the fax
762 -# as MIME image/tiff attachments. Comment this out to do
763 -# nothing. Protect with single quotes.
765 -NOTIFY='faxmail "$REMID" "$f" $FILES | $SENDMAIL $FAXMGR'
766 -# NOTIFY='mail -s "fax/message from $REMID: $FILES" $FAXMGR <$f'
767 -# NOTIFY='lpr $f ; $FAX print $OPT $FILES'
769 -# The number of rings to wait before answering.
773 -# If you want to enable fax/data adaptive answer (AA) read the
774 -# efax man page and define DATAINIT to be the options that enable
775 -# AA. Note: AA does not work properly on some (2400/9600) modems
776 -# unless the modem initialization is done at 2400 bps (not
777 -# possible with efax). USR modems do not support modem adaptive
778 -# answer (+FAE=) in Class 1. &C1 enables most modems' DCD line
779 -# so a signal can be sent to shells when a call is dropped. You
780 -# must also define DCMD (see below).
782 -DATAOPT="-j&C1 -j+FCLASS=0 -jS7=30"
783 -# DATAINIT="$DATAOPT -j+FAE=1" # Class 1 modem adaptive answer
784 -# DATAINIT="$DATAOPT -j+FAA=1" # Class 2[.0] modem adaptive answer
785 -# DATAINIT="$DATAOPT -oa" # software adaptive answer
786 -# DATAINIT="$DATAOPT" # data-only answer
788 -# If you have a voice modem and want to answer in voice mode
789 -# define VOICEINIT to be the options that enable voice mode. You
790 -# must also set VCMD below. Voice support is not yet available.
792 -# VOICEINIT="-j#CLS=8" # Rockwell voice modems
793 -# VOICEINIT="-jM2L2#CLS=8#VLS=4" # with speaker on
795 -# Argument to exec(2) of "/bin/sh -c" for incoming data calls.
796 -# This command will usually exec getty(8) but can include other
797 -# commands to set up the serial port, etc. Up to 6 %d arguments
798 -# are replaced by the baud rate following the CONNECT response
799 -# from the modem or 19200 if none. If using getty_ps ensure
800 -# /etc/gettydefs has entries for all possible %d values
801 -# (e.g. 19200). Use 'nice' if required to reduce any special
802 -# priority set by NICE.
804 -DCMD="exec /sbin/getty -h $DEV %d vt100" # for getty_ps (Linux)
805 -# DCMD="exec /sbin/agetty -h $DEV %d vt100" # for agetty (Linux)
806 -# DCMD="exec pppd $DEV %d" # start PPP server
808 -# Argument to exec(2) of "/bin/sh -c" for incoming voice calls.
809 -# This command will usually be a shell script that interacts with
810 -# the caller by using efone to play/record audio and detect DTMF
811 -# tones. Up to 6 %d arguments are replaced by the modem file
812 -# descriptor. VCMD can "exec fax reanswer" to switch to fax or
813 -# data mode if required.
815 -FONE=/usr/bin/fone # minimal voice mail
816 -VCMD="exec $FONE %d"
818 -# The owner.group and mode to which "fax answer" sets the serial
819 -# device. This allows non-root processes to grab the device from
820 -# efax even if a previous process (e.g. login) has changed it.
821 -# Comment out if you don't need to reset device ownership.
823 -OWNER=root.tty # typical
825 -# MODE=660 # only owner & group
827 -# Regular expression for efax exit codes in log files that will
828 -# *not* be saved. For example, use [145] to ignore exits due to
829 -# `locked' (1), `no modem' (4), and `signal' (5) conditions
833 -# ****************************************************************
834 -# --- End of user configuration section ---
835 -# ****************************************************************
837 +. /etc/sysconfig/efax
839 # --- source configuration files