# additional script to # fax - script to make, send, receive, view or print a fax # Copy this file as /etc/efax.rc and edit it. # Masaki Shinomiya, 30 Jan 2002 # # --- Start of user configuration section --- # # Note: do not put spaces before or after the equal (=) signs. ## <-- bigining two sharps means alrready default in /usr/bin/fax # *********************************************************************** # ESSENTIAL: Firstly, set your fax number and the header # *********************************************************************** # Your fax number in international format, 20 characters maximum. # Use only digits, spaces, and the "+" character. # It will appear on the header line of the each page. #FROM="+81 999 99 9999" # 81 is Country code. Remove the prifix '0' as distance call. # NAME will also appear on the header line. # Each user may overwrite it in the file ~/.efaxrc #NAME="My Name" # *********************************************************************** # Others depend on your system # *********************************************************************** # The device to which the fax modem is connected (e.g. ttya for # /dev/ttya). Use a dial-out (cua) device if available. If # there are links to this device then all programs must use same # name or the UUCP locking mechanism will fail. For example, if # /dev/modem is a link to /dev/cua1, then getty, uucp, kermit, # pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1. ##DEV=modem # Dial string prefix and suffix such as T for tone dialing, P for # pulse dialing, 9 to get an external line, commas for delays or # W to wait for dial tone. See definition of TELCVT below if you # have more complex requirements. ##DIALPREFIX="T" ##DIALSUFFIX="" # Shell command to convert phone numbers to dial strings. This # lets you to store numbers without the long distance or # alternate carrier access codes, passwords, accounting digits, # etc. In the examples below this is used to convert numbers # beginning with '+'; the first substitution handles same-country # calls and the second handles international calls. # Exsample: '+81 3 9999 9999' is converted into '0 3 9999 9999'. # '+1 99 999 999' is coverted into ' 010 1 99 999 999'. #COUNTRYCODE='81' # Japan #INTERNATIONAL='010' # Myline #LONGDISTANCE='0' # Myline #TELCVT="sed -e s/+$COUNTRYCODE/$LONGDISTANCE/ -e s/+/$INTERNATIONAL/" # The preferred page size for creating and printing faxes. # Allowed values are "letter", "legal", and "a4". ##PAGE=letter # PAGE=legal # PAGE=a4 # Default resolution for converting to fax format. Can only be # 204x196 or 204x98. ##RES=204x196 # default "Fine" resolution (196 lpi) # RES=204x98 # standard resolution (98 lpi) # The command to view a Portable Gray Map (PGM) image from the # standard input. Typically "xv -" or "xloadimage stdin". ##VIEWCMD="xloadimage stdin" # best # VIEWCMD="xli stdin" # alternative # VIEWCMD="pnmtoxwd | xwud" # slower alternative # VIEWCMD="xv -" # much slower alternative # The type of fax modem commands to use. Un-comment one of the # following lines depending on your modem. # Auto detection will be tried if you leave them all commented out. # CLASSINIT="-o1" # Class 1 # CLASSINIT="-o2" # Class 2 # CLASSINIT="-o0" # Class 2.0 # The list of delays in seconds between attempts to redial busy numbers. ##BUSYRETRIES="30 60 120 300 60 600 60 60 1200 60 60" # The list of delays in seconds between attempts to retry failed transmissions. # Retries are only attempted if at least one page was sent in the previous attempt. ##FAILRETRIES="300 300" # try two more times at 5 minute intervals # *************************************************************** # Print command # *************************************************************** # The type of printer. Use 'pcl' for HP-PCL or 'ps' for # Postscript. See definition of PRINT (below) for more options. ##PRTYPE=ps # Postscript (e.g. Apple LaserWriter) # PRTYPE=pcl # HP-PCL (e.g. HP LaserJet) # The command to print image files from standard input. Typically # this is "lpr" or "lp". ##PRCMD="lpr" #PRCMD="lpr -Plp0" # PRINT: A command to convert fax files to a printable format. # For printers other than Postscript or PCL you can use efix's # PBM output and an appropriate pbm filter (such as pbmtoepson) # or efix's Postsript output and Ghostscript as a filter. Change # the scaling (-s) and displacement (-d) options as required to # fit the image onto the area your printer can print. ##PRINT='$EFIX -ve -p$PAGEDIM -r300 -o$PRTYPE $f' # PRINT='$EFIX -ve -p$PAGEDIM -r300 -s0.98 -d0,0.125 -o$PRTYPE $f' # Note: Some european locale cause trouble in decimals. Try, # PRINT='$EFIX -ve -p$PAGEDIM -r300 -s0,98 -d0x0,125 -o$PRTYPE $f' # example using pbm utilities: # PRINT='$EFIX -ve -p$PAGEDIM -r60x72 -opbm $f | pbmtoepson' # PRINT='$EFIX -ve -p$PAGEDIM -r300 -s0.9x0.9 -d0.5,0 -opbm $f | pbmtolps' # example using Ghostscript: # PRINT='$EFIX -ve -p$PAGEDIM -r120x144 -ops $f | \ # $GS -q -sPAPERSIZE=$PAGE -sDEVICE=epson -r120x144 \ # -dNOPAUSE -dSAFER -sOutputFile=- - ' # example using ImageMagic: (only if 'efix' has some trouble) # PRINT='convert tiff:$f -scale 2400x3100 faxtmp.pbm; cat faxtmp.pbm | pbmtolps' # **************************************************************** # The remaining configuration options apply only to the `fax # answer' command. You can ignore these if you will only be # running efax manually. See "USING INIT TO RUN EFAX" in the # efax man page for more information. # **************************************************************** # These directory should already exist and be writable by the user(s) of this script. # Group 'uucp' and permission 775 is recomended, # But, LOGDIR(defalt is /var/log/fax), directory for LOCK (default is /var/lock) # shold be 777 if you like to send faxes by using print spooler. # OUTGOINGDIR to be owned by 'lp' and permission 700 is recomended, ##FAXDIR=/var/spool/fax ##LOGDIR=/var/log/fax # Re-defining the lock file for the case the device file name changed LOCK='-x /var/lock/LCK..$DEV' # The directory to store incoming faxes, outgoing faxes and log files. # Set same as mgetty+sendfax for convenience # this would work with efax-spooling.patch INCOMINGDIR=/var/spool/fax/incoming OUTGOINGDIR=/var/spool/fax/outgoing # The user to be sent mail when a fax is received. # or you can make an alias of root in /etc/aliases ##FAXMGR=root # The command to execute when a fax is received. Normally this # sends FAXMGR e-mail or prints the received fax. The variable # $f will be the name of the log file, $FILES will contain the # names of the received files, and $REMID will have the remote ID # string or '?' if none. The faxmail function will e-mail the fax # as MIME image/tiff attachments. Comment this out to do # nothing. Protect with single quotes. ##NOTIFY='faxmail | $SENDMAIL $FAXMGR' #NOTIFY='mail -s "fax/message from $REMID: $FILES" $FAXMGR <$f' #NOTIFY='$FAX print $OPT $FILES' # The number of rings to wait before answering. #Some modems support only 'ANSRINGS=1'. ANSRINGS=1 # For debugging, set filename insted of /dev/console ##CONSOLE=/dev/console # CONSOLE=$LOGDIR/efax.log # **************************************************************** # see comments in /usr/bin/fax for farther scripts # ****************************************************************