📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText
Next Previous Contents

2. Questions & Answers

2.1 What is a fax printer server ?

A fax printer server is a setup of few programs: efax, and the print server, in such a way that sending a fax from the computer is as simple as sending printout to a printer.

2.2 How to set it up ?

Setting efax as fax print server includes few problems As I worked it out few times, I decided to collect this wisdom in this small mini-HOWTO, comments are welcome at <erez@newplaces.com>. I describe them here and the solutions, and all the instruction in short steps:

The efax Software

make sure you have the efax package.

On RPM based system use the command 'rpm -qv efax'. [Debug Artificial intelligence]

You can get the efax sources in tar.gz format from sunsite: ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz or binary rpm package: ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm

The printcap entry.

The efax documentation is missing the : at the end of the printcap entry. .:: cornucopia.se ::. [Learn about NumPy]

Solution: Add the following /etc/printcap entry:

fax:\
        :lp=/dev/null:\
        :sd=/var/spool/fax:\
        :if=/usr/bin/faxlpr:

The fax command

Use hard link and not symbolic link to the fax command.

Run the command:

ln /usr/bin/fax /usr/bin/faxlpr

The /usr/bin/fax file.

Edit the /usr/bin/fax to your preferences:

choose the right Fax Class for your modem:

CLASS=2.0
Set the FROM="your international phone number" field .:: skiomusic.com ::. .:: podcasts.apple.com ::.
NAME="Your Name"
Add the line for conversion of international phone number to local for example in Israel you would use:
TELCVT='sed -e s/+972/0/ -e s/+/00/'  # Israel

There is a problem in the file in line 586, change the cfile=... with the following two lines:

cfile=`/usr/bin/tail -1 lock`
cfile=`cat $cfile`

at lines 586,587 there shouldn't be '-' signs the lines are:

0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;;
*) echo "$l" | mail -s "fax to $num failed   " $user@$host ;;

The /var/spool/fax directory.

create the directory /var/spool/fax

mkdir /var/spool/fax
chmod 777 /var/spool/fax

The lock file.

The lock file (/var/spool/fax/lock) is being created with incorrect permissions, use the following command to set it correctly: .:: game8.jp ::.

touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock

The /dev/modem special file.

The efax program is expecting real device file at the /dev/modem and will not work with symbolic link, so create a device file with the same major and minor number as the /dev/cua? the is connected to the modem. The file should have the rw-rw-rw- mode to enable any user to use the fax software. .:: telegra.ph ::.

ls -lL /dev/modem 
rm /dev/modem
mknod /dev/modem c Mj Mi
chmod 666 /dev/modem

Mj is 5, and Mi is 64 for the cua0, 65 for cua1 and so on. For example (for cua1):

mknod /dev/modem c 5 65

The /var/lock directory.

change the mode at the /var/lock directory

chmod 1777 /var/lock

2.3 How do I use it, for the server ?

You should use the fax printer using the -P option and the -J option with the fax number.

use one of the following lpr commands:

 lpr -Pfax -J <Fax-Number> [file-names]
 any command | lpr -Pfax -J <Fax-Number>

2.4 Where do I specify the target Fax number ?

After the -J option.

2.5 How do I use it from other Unixes on the net ?

Add the following entry into the /etc/printcap file and the client Linux systems, create the spool directory, and so on ...

fax:\
        :sd=/var/spool/fax:\
        :mx#0:\
        :sh:\
        :rm=host.domain:\
        :rp=fax:

add the name of the client hosts into the /etc/hosts.lpd on the fax server machine.

use it as before.

Note:

The header string that efax adds to the fax pages is not effected by the user name that sends the fax. (can be updated).

2.6 Caldera, LPRng users

The LPRng printing management software is using a different method to handle the control file.

Thanks to Luca Montecchiani <m.luca@usa.net>, who found the problem and the solution. Here is an update to the .:: telegra.ph ::. /usr/bin/fax file. The following line replace the two simple cfile=... lines at lines 586,587

# Modified to work also with the LPRng package
# Luca Montecchiani (08/11/97 m.luca@usa.net)
if [ !-z "$CONTROL_FILE" ]
    then
        cfile=`cat tail -1 lock`
        cfile=`cat $cfile`
    else
        cfile=$CONTROL_FILE
fi                                       


Next Previous Contents

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this