How to Set up a fax server in Linux (1)

Source: Internet
Author: User

FAX Server is a network-based client/Server FAX system. The Server software provides shared FAX functions for network users, client software allows you to send a fax directly on your terminal, just as sending an Email or printing a file. This article will lead you to build a fax server in seven steps.

I. Introduction

The configuration described below uses Hylafax 4.0p2.rjc11, which runs on Mandrake7.1. On the server side, Hylafax consists of three daemon:

Faxq: main service programs

Hfaxd: Manage Network Connections

Faxgetty: Manage sessions between Modem

The following programs run on the client 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 recommend that you install the following software packages, which 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. To install Hylafax, you must 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 must perform this operation as root)
In addition to the following items, select OK for all other query options, that is, select the default value:

1) Country code [1]? Enter 33 for France

2) Area code []? Enter 1 for Paris

3) Long distance dialing prefix [1]? Enter 0

4) International dialing prefix [011]? Enter 00

5) Dial string rules file [etc/dialrules]? Enter etc/dialrules. europe

6) 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. This process can be completed manually.

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

Run kill-HUP l, 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 Serial Port 1 is created for faxgetty, including the configuration of the/dev/ttyS0 modem. The/usr/share/fax/hfaxd. conf file contains the configuration of the hfaxd daemon.
Possible problems:

Use the probemodem command to detect the modem. In addition, there are some typical configurations in/var/spool/fax/config.

If your modem is 3Com, you can copy the usr-2.0 file to/var/spool/fax/etc, change it 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.


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.