How to configure Linux as a FAX server

Source: Internet
Author: User
Tags perl script
Article Title: how to configure Linux as a FAX server. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
   I. Introduction
The configuration described below uses Hylafax 4.0p2.rjc11, which runs on Mandrake7.1. In service
Hylafax consists of three daemon:
Faxq: main service programs
Hfaxd: Manage Network Connections
Faxgetty: Manage sessions between Modem
The program running on the client is as follows (these programs can also be run on the server ):
Sendfax: send a fax
Faxstat: check the fax queue
Faxrm: deletes a job from the queue.
The related configuration files are in the/var/spool/fax/etc/folder.
  
   Ii. Installation
I strongly recommend that you install the following software packages (both of them are included in Mandrake 7.1 ):
Ghostscript ftp://ftp.cs.wisc.edu/pub/ghost/aladdin
Libtiff ftp://rufus.w3.org/linux/redhat
You can also obtain these resources from the official website http://www.hylafax.org/links.html. Install Hylafax,
Install the following RPM packages:
Rpm-ivh hylafax-common-4.0pl2.rjc11-3mdk
Rpm-ivh hylafax-client-4.0pl2.rjc11-3mdk
Rpm-ivh hylafax-server-4.0pl2.rjc11-3mdk
  
   3. Configure Hylafax
Run the following command to configure the server:
Faxsetup-server (the operation must be performed as root)
In addition to the following items, select OK for all other query options, that is, select the default value:
· Country code [1]? Enter 33 for France
· Area code []? Enter 1 for Paris
· Long distance dialing prefix [1]? Enter 0
· International dialing prefix [011]? Enter 00
· Dial string rules file [etc/dialrules]? Enter etc/dialrules. europe
· Serial port that modem is connected to []? Enter ttyS0 (for COM1) or
TtyS1 (for COM2)
By default, Hylafax does not automatically call the daemon faxgetty at startup.
Process.
1. Edit the/etc/inittab file and insert the following content at the end of the file:
Mo: 2345: respawn:/usr/sbin/faxgetty-D ttyS0
Then run kill-HUP l to restart faxgetty.
Or modify the rc. local file:
2. Add the following lines to the/etc/rc. d/rc. local file:
/Usr/sbin/faxgetty-D/dev/ttys0
Run faxgetty-D/dev/ttys0.
Note: You can use the faxaddmodem command to add multiple modems.
After these operations, the file/var/spool/fax/etc/config. ttyS0 is created for faxgetty.
(Serial Port 1), including the configuration of the/dev/ttyS0 modem. File/usr/share/fax/hfaxd. conf
I have not made any changes to the hfaxd daemon configuration.
  
Possible problems:
Use the probemodem command to detect the modem. In addition, there are some typical examples in/var/spool/fax/config.
Configuration
.
My modem is 3Com's US Robotics 56 K, So I copy the usr-2.0 file
In/var/spool/fax/etc, change the name to config. ttyS0 and make the following changes:
# Configuration for using the Class 2.0 command interface
# With a USR v.34 Courier or Sporster modem.
#
# CONFIG: CLASS2.0: USRobotics *-*
#
CountryCode: 33
AreaCode: 1
# FAXNumber: your number ex (for france): 0134123412
LongDistancePrefix: 0
InternationalPrefix: 00
DiadStringRules: etc/dialrules. europe (Important. europe !)
ServerTracing: 1
SessionTracing: 11
RecvFileMode: 0600
LogFileMode: 0600
DeviceMode: 0600
RingsBeforeAnswer: 1
SpeakerVolume: off
GettyArgs: "-h % l dx _ % s"
# LocalIdentifier: "Your Company" (uncomment if wanted on the fax)
# TagLineFont: etc/lutRS18.pcf (idem)
# TagLineFormat: "De % l | % c | Page % p sur % t" (idem)
# MaxRecvPages: 25
ModemType: Class2.0 # use class 2.0 interface
ModemRate: 57600 #38400 DCE-DTE communication rate
ModemFlowControl: rtscts # XON/XOFF flow control assumed
ModemDialCmd: ATDT0 % s # I added 0 because I go through a PABX !!
# ModemNoFlowCmd: AT & H0 & I0 & R1 # setup modem for no flow control
ModemHardFlowCmd: AT & H1 & I0 & R2 # setup modem for hardware flow control
# ModemSoftFlowCmd: AT & H2 & I2 & R1 # setup modem for software flow control
# ModemSetupDTRCmd: ATS13 = 1 & D2 # setup so DTR drop resets modem
# ModemSetupDCDCmd: AT & C1 # setup so DCD reflects carrier (or not)
ModemResultCodesCmd: ATQ0X4 # enable extended result codes
# ModemSetupAACmd: AT + FAA = 1
# ModemSetVolumeCmd: "ATM0 ATM1 ATM1 ATM1"
Class2BUGCmd: AT + FBU = 0
Class2CQQueryCmd :! (0), (0) # override modem response
Class2NRCmd: AT + FNR = 1, 1, 0
Next, add the following lines to/var/spool/fax/etc/host:
Localhost
192.168.0.1
Allow all machines in the domain 192.168.1.0 to use faxes.
  
   4. Start Hylafax
To automatically run Hylafax at startup, run the drakxservices command in Mandrake,
Run the setup command in Red Hat and then manually run the following command:
/Etc/rc. d/init. d/hylafax start
If no faxgetty exists in the Process List (ps-e), try the following command:
/Usr/sbin/faxgetty-D/dev/ttyS0
  
   5. How to Use Hylafax
Send Fax:
Sendfax-n-d number file1 file2
Check Results:
Faxstat-s (displays the faxes sent in the queue)
Faxstat-d (display sent faxes)
Faxstat-r (display received fax)
Remove a fax from the queue:
Faxrm number_of_job
Clear the buffer pool:
Faxqclean
Show statistics:
Faxcron
  
   6. Use Hylafax in the Network
Server Configuration:
On http://www.hylafax.org/links.html, you can find many links related to hylafax,
On
Http://www.boerde.de /~ Horstf downloads Printfx and Repond
.
You need to download three files:
Printfax. pl (perl script)
Respond.zip(respond.exe pressure package)
Smb_conf.add (the module to be added to/etc/smb. conf)
Copy printfax. pl To the/usr/bin/directory and make the following changes:
### Format of commandline
# $ Response linefmt = mgetty;
$ Export linefmt = hylafax;
### The faxspoolprogram
### For mgetty + sendfax:
# $ Faxspool =/usr/bin/faxspool;
### For hylafax:
$ Faxspool =/usr/bin/sendfax;
### Additional faxspool args (e.g. header, coverpage)
### Empty:
@ Faxspool_args = qw (-n );
### For mgetty + sendfax with a special header:
# @ Faxspool_args = qw (-h/usr/local/etc/mgetty + sendfax/faxheader. smb );
### For hylafax with send email when job is done or requeued and use
### A4 sized paper:
# @ Faxspool_args = qw (-D-R-s a4 );
Note: Check the version number of printfax. pl before modification. You may have modified the version you downloaded.
Add the smb_conf.add module to/etc/smb. conf:
[Fax] comment = Fax Printer
Public = yes
Postscript = yes
Print command = (/usr/bin/printfax. pl % I % s % U % m; rm % s )&
Printable = yes
Writable = no
Path =/var/spool/samba
Check the print command, especially the print command in windows2000.
Restart Samba. /Etc/rc. d/init. d/smb restart
Client Configuration:
The following is a typical client configuration in Windows 95/98/NT/2000. Install respond.zip, including
Config.exeand respond.exe:
1. Copy these two files to the widows directory, for example, c: windows
2. Create a respond.exe link under START-> PROGRAMS-> start( how to do fast in win2000)
For more information, see win2000 ).
3rd, run respond.exe or restart the computer.
Then you must create a network printer:
1. Click START> printers> add.
2. Select a network printer
3. Click "browse" and select the FAX printer (Samba printer) on the network)
4. Choose HP-> HP Laserjet 4/4 m postscript driver
5. Do not print the test page
6. After creating the printer, Go to START-> Printers and click the properties of the FAX printer.
7. In the Properties dialog box, click detail and spooler.
8. Select "Start printing after the last page"
Install the client here. Next, open Wordpad and enter some text to print on the fax printer!
The dialog box appears on the screen (if respond.exe is run), ask the recipient's fax number, and enter
If you select "OK", the fax will be sent to the hylafax fax server.
Enter faxsat-s on the server to check whether the system is working normally.
Sent fax.
Typical configurations of Linux clients:
Use a utility on the Hylafax website.
  
   7. send an email with FAX
You can use FAX to send emails to StarOffice on the server. In addition, databases can be placed on any network
And can be accessed by StarOffice
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.