0% found this document useful (0 votes)
159 views26 pages

Hylafax

HylaFax is an open source fax server software that can be installed on Linux. It supports sending and receiving faxes via serial or USB modems. The document outlines the steps to install and initially configure HylaFax, including adding a modem, setting country-specific options, and enabling HylaFax to start automatically on boot. Key steps include running the 'faxsetup' utility for initial setup, adding a modem device using 'faxaddmodem', and editing configuration files to fine-tune options.

Uploaded by

ber
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
159 views26 pages

Hylafax

HylaFax is an open source fax server software that can be installed on Linux. It supports sending and receiving faxes via serial or USB modems. The document outlines the steps to install and initially configure HylaFax, including adding a modem, setting country-specific options, and enabling HylaFax to start automatically on boot. Key steps include running the 'faxsetup' utility for initial setup, adding a modem device using 'faxaddmodem', and editing configuration files to fine-tune options.

Uploaded by

ber
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

• HylaFax

Translation(s): English - Italiano ?Discussion

HylaFAX, an advanced open source fax server.

Based on http://lucasmanual.com/mywiki/FaxServer and


http://www.aboutdebian.com/fax.htm

Sommaire
1. Installation
1. Xen / Virtualisation

2. Initial Configuration

3. Sending a fax from the command line

4. Configuring Network Faxing


1. Access Controls

2. Creating Users
5. Configuring Fax to Email
1. FaxDispatch

6. Configuring Email to Fax with Exim

7. Automatically Printing Incoming Faxes

8. Viewing faxes through internet browser

9. Fax Sending Clients

1. Linux
2. Windows

10. Known Working Hardware


1. Serial Modems
2. Multiport Serial Adapters

3. USB Modem
4. Adding a Dial Prefix

11. Multiple Incoming Fax Lines


1. Configuring a multi-port serial PCI card
2. FaxNotify

12. Common Errors


1. Minicom works, but faxaddmodem does not see a modem
2. Failure to receive silence

3. T.30 T2 timeout, expected signal not received


4. Unspecified Phase C error, including too much delay between TCF and +FDR

command
5. No Dial Tone
6. No carrier Detected
7. Modem Wedged

8. 4 ports serial card, more then 4 modem support


13. Tools

1. Archive Faxes

2. Send batch faxes


14. Maintenance
1. Restart Hylafax

2. Checking Fax Status

3. Removing a fax job

4. Printer not printing


15. Country Specific

1. General

Installation
• Install the DebPkg: hylafax-server package

apt-get install hylafax-server

• Make sure your modem is connected. External modems may be


connected via a serial port, or a USB port(when using a serial to USB
converter.)

Xen / Virtualisation

Warning - It is possible that Hylafax may have problems running in a


virtual environment. Fax sending and receiving is very time critical.
There has been numerous cases where a setup is fine but the virtual
environment causes failures that are hard to diagnose.

Initial Configuration
run the faxsetup utility to begin configuring hylafax.

faxsetup

• When you press Enter, you'll see a lot of text fly by, as faxsetup
checks system settings.
• Assuming there were no errors, you will see a menu like the
following:

HylaFAX configuration parameters are:

[1] Init script starts faxq: yes

[2] Init script starts hfaxd yes


[3] Start old protocol: no

[4] Start paging protocol: no


Are these ok [yes]?

• press enter to answer yes


• Next, faxsetup will write some configuration files, and ask you for
permission to stop the faxq process, like the following.

Modem support functions written to /var/spool/hylafax/e

tc/setup.modem.

Configuration parameters written to /var/spool/hylafax/

etc/setup.cache.

Restarting HylaFAX server processes.

You have a HylaFAX scheduler process running. faxq wil


l be
restarted shortly, as soon as some other work has been

completed.
Can I terminate this faxq process (24932) [yes]?

• Press enter to answer yes


• faxsetup then asks permission to restart the hylafax server process.
Press enter to answer yes
• Since we have not set up a modem already, faxsetup will prompt you
to run 'faxaddmodem'. Press enter to answer yes
• Enter the device name of the serial port your fax-modem is
attached to(make sure your modem is connected to serial port not
the parallel port). HINT: ttyS0 is for the first serial port (COM1
under windows/dos), and ttyUSB0 is the first usb-to-serial
adapter.
• Next you'll be prompted for quite a few values. For most of them,
you can accept the default values by pressing Enter. The values
you'll want to enter are:

* Country code (1 for US)

* Area code (fill in with your area code)

* Phone number of fax modem (in +1.xxx.xxx.xxxx

format, for the US)

* Local identification string (this should be s

omething similar 'My Fax Server' as it is printed on th


e tag line of outgoing faxes)

* Long distance dialing prefix (1 in US)

* International dialing prefix (011 in US)

* Dial string rules file (accept the default)

* Tracing during normal server operation (accep

t the default)

* Tracing during send and receive operations (a

ccept the default)

• The next few values have to do with file system permissions for
some created files. For a fax to email gateway, the defaults are
acceptable, but if you want to share files directly out of the fax queue
with a FTP or HTTP server, other permissions may be desirable.
• Continue entering values:

* Protection mode for received fax - enter 0644


if you want to share files directly, accept the defaul
t 0600 otherwise

* Protection mode for session logs - enter 0644


if you want to share files directly, accept the defaul

t 0600 otherwise
* Protection mode for ttySx - enter 0666 if sha

ring the modem, 0600 if you are using this modem only w
ith hylafax

* Rings to wait before answering - The default


is 1 but setting it to 0 establishes your server as a "
Send Only" fax system

* Modem speaker volume (valid values are OFF QU


IET LOW MEDIUM HIGH) (you may want to set it to HIGH fo

r testing purposes as you can change it to OFF later)


* Command line arguments to getty program (acce
pt the default)

* Pathname of TSI access control list file (acc

ept the default)

* Pathname of Caller-ID access control list fil

e (accept the default)

* Tag line font file (accept the default)

* Tag line format string (accept the default)


* Time before purging a stale UUCP lock file (a

ccept the default)

* Hold UUCP lockfile during inbound data calls

(accept the default)

* Hold UUCP lockfile during inbound voice calls

(accept the default)

* Percent good lines to accept during copy qual


ity checking (accept the default)

* Max consecutive bad lines to accept during co


py quality checking (you may want to reduce the default

5 to 3)
* Max number of pages to accept in a received f
ax (you may want to increase the default value of 25)

* Syslog facility name for ServerTracing messag


es (the default is 'daemon' but you could change it to

'local7' if you're logging to a remote syslog server, a


nd want to separate fax logging from other log messages

)
* Set UID to 0 to manipulate CLOCAL (accept def

ault)
* Use available priority job scheduling mechani
sm (accept default)

• You'll then be asked to confirm the values that you entered. Press
Enter to accept them.
• setupfaxmodem will now talk to the fax-modem to determine the best
speed to talk to it, and the fax classes that it supports.
• If this step fails, there is a likely a communication problem with
your modem. Examine possible remedies in the Common Errors
Section.
• Even if your modem supports both Class 1 and Class 2 you should
set it to Class 1 to ensure compatibility with all fax machines.
• You will then be asked for values specific to the modem. Just press
Enter to accept the default values as they are a result of the modem
query and the class you selected. You'll then be prompted to confirm
these values by pressing Enter.
• The non-default scheduler values will then be displayed followed by
a confirmation prompt.
• Make sure all these values are correct. If they are not, answer No
and correct any erroneous values.
• Note that you may want to increase the time value for "Timeout
when converting ?PostScript documents" if you fax long
documents.
• You can just press Enter to accept the default values.
• assuming all of the above went smoothly, faxaddmodem will now
return control to faxsetup, and you are done configuring your first
modem.

• If you are only configuring one fax-modem, answer no when asked if


you want to configure another modem. Otherwise, answer yes, and
perform the above faxaddmodem related steps again.
• Next, accept the default yes answer to run faxmodem on your newly
configured modem to verify settings.
• You should now be returned to the shell prompt.
• If you want to manually edit the files that contain these settings, use
your favorite editor on the 'config' and 'config.MODEMDEVICE' files
in /etc/hylafax (where MODEMDEVICE is the device the modem is
attached to)

• Next we'll set up HylaFAX to run automatically when you boot the
system. Use your favorite text editor to examine the contents of the
/etc/default/hylafax configuration file.
• Make sure there's no # character at the beginning of the line
containing RUN_HYLAFAX=1.
Assuming the above steps went well, running /etc/init.d/hylafax restart
should result in hylafax listening to the modem for incoming faxes, and
allowing local command line fax sending.

Sending a fax from the command line


To test our newly installed fax server, we're going to send a text file to a
remote fax machine.

To send a fax from the command line, run the following command:

sendfax -n -d <PHONENO> /etc/issue.net

where <PHONENO> is the phone number of a fax machine you can


receive a fax at (that is not on the same phone line as your hylafax
server).

assuming all went well, you should now have a fax waiting on you at the
phone number you entered.

Configuring Network Faxing


Now we're going to let HylaFAX know who on the local network is
allowed to send faxes. If you are not allowing local network users to use
this fax server, you can skip this section.

Access Controls

To allow users on the local network access to the fax server, you can
use a subnet wide rule to let everyone use it, or select individual
addresses.

• Edit the /etc/hylafax/hosts.hfaxd file with your favorite text editor.


• For example, if your using a network has addresses in the range
192.168.10.0, and your subnet is 255.255.255.0, you would enter
the following line into the hosts.hfaxd file:

192\.168\.10\.:::
• Likewise, if your using a network containing addresses in the range
172.16.0.0, and your subnet is 255.255.0.0, your hosts.hfaxd file
entry would be:

172\.16\.:::

• You can enter as "wide" of a network address as you like, or multiple


narrower address entries. If you'd like to restrict access to specific
users you can enter their individual IP addresses. When done, save
the file and exit the editor.

After editing this file, it is necessary to re-start the hylafax server by


issuing the command /etc/init.d/hylafax restart

Creating Users

For each user on the network you want to print to your fax server, you
need a user on your system

adduser dept1

• Fill in the username and password, etc


• Then add user to hylafax. First find out what is your new user UID

cat /etc/group

• Find your user. It should be something like dept1:x:1001: so this


user UID is 1001
• Now tell hylafax about it

faxadduser -p password -u 1001 username

Configuring Fax to Email


To route incoming faxes to a destination other than sitting in the recvq,
we're going to create a FaxDispatch script in /etc/hylafax.
FaxDispatch

• FaxDispatch is a custom script that one can create for Hylafax to


specify nonstandard delivery options. Normally, incoming faxes are
dropped into the /var/spool/hylafax/recvq/ directory.
• A sample FaxDispatch file is available in
/usr/share/doc/hylafax-server/examples/FaxDispatch.example
• Use your favorite text editor to create a /etc/hylafax/FaxDispatch
file containing the following:

## FaxDispatch file - routes all inbound faxes to myema

[email protected] as TIFF files

##

## Consult the faxrcvd(8C) man page for more informatio


n

##

[email protected];

FILETYPE=tiff;

Please note that using filetypes other than tiff are allowed, but tiff is the
native language spoken by the fax system, and therefore requires the
least ammount of work to handle, on the fax server.

Configuring Email to Fax with Exim


The email becomes the first page and all attachments will be sent as
additional pages, however handling of the attachments is not perfect, in
particular jpeg. For best results use PDFs as they seem to be processed
reliably and are already paper sized.

Fax recipients must have addresses in this format:

[email protected]

Router

exifax:
driver = manualroute
transport = exifax

route_list ="*.fax"

Transport

exifax:

driver = pipe

user = faxmaster

command ="/usr/bin/faxmail -n ${local_part}@${extract

{1}{.}{$domain}}"

Automatically Printing Incoming Faxes


• If you would like to print and then move incoming faxes out of the
/var/spool/hylafax/recvq/ directory, you would create a FaxDispatch
file this below:

## and/or by device

FOLDER="/var/spool/hylafax/recvq/"

FULLPATH="${FOLDER}${FILENAME}.tif"
case "$DEVICE" in
ttyS14) /usr/bin/tiff2ps -w 8.5 -h 11 -a $FILE |lpr -

P kyocera; mv $FULLPATH /var/spool/hylafax/recvq/dept1/


;; # all faxes received on ttyS14

ttyS15) /usr/bin/tiff2ps -w 8.5 -h 11 -a $FILE |lpr -


P kyocera; mv $FULLPATH /var/spool/hylafax/recvq/dept2/

;; # all faxes received on ttyS15


esac

Please note that specifying the size of a page is recommended to make


sure 11x14 pages are printed properly.

Viewing faxes through internet browser


• To do that install apache web server
apt-get update
apt-get install apache2

• Now add a link to your faxes

cd /var/www

ln -s /var/spool/hylafax/recvq fax

• Now open a broswer and go to http://localhost/fax/, or by your ip


address http://10.10.10.10/fax

Fax Sending Clients


In general the list of all the software is here, but you can just go to the
following URL. http://www.hylafax.org/content/Client_Software

Linux

You can use Gfax or Kde Print Fax. You install it Gfax by:

apt-get update
apt-get install gfax

Then Go to Application then Office then Gfax.

• This needs to be tested but:

Now i can do fax from OpenOffice, TextEditor, etc..

1. Install GFax from apt-get install gfax

2. Configure GFax with your Fax Server (HylaFAX).. I ho


pe you know how to do it..
Ok, you can test your GFax configuration by test sen

d a fax with Text Editor (Applications -


Accessories)

3. To make it work with openoffice, run /usr/lib/openof


fice/program/spadmin (with root access), you

do sudo -i, or whatever.


4. You add fax / pdf converter from spadmin GUI, fill t

he command with: gfax (TMP)


5. That's it... you save the configuration
6. Try fax an openoffice document

1st time i try fax with Fax Printer, it hang..

then i tried fax with PDF Converter and set the PDF Fol

der, then after fax, i close the GFax and not

hang.

Windows

• On windows you would use this Win print Hylafax software. You can
download it at http://winprinthylafax.sourceforge.net/
• ADMINISTRATION:Download program called WHFC which will tell
you the status of the hylafax servers.

Known Working Hardware


Serial Modems

1. US Robotics 56K External Fax Modem; 5686E (Does not come with
cable)
2. USRobotics Courier V.Everything External Fax Modem
3. Amigo AME-CA95, External V.92 DATA/FAX/TAM Modem
-(newegg.com)

Multiport Serial Adapters

1. Startech.com 4 Multi Port Serial PCI Card


2. Startech.com 2 Port Serial PCI Card

USB Modem

Link that sells the USB modem (sorry it's in greek, I couldn't find any
other site for it): http://www.e-shop.gr/show_per.phtml?
id=PER.533709

lsusb recognizes it as:


Bus 001 Device 002: ID 0483:7554 SGS Thomson Microelect
ronics 56k SoftModem

idVendor 0x0483 SGS Thomson Microelectronic

idProduct 0x7554 56k SoftModem

The driver known to work with it is the 'slusb' SmartLink driver, see
slmodem.

The modem is installed under /dev/ttySL0. Special Hylafax


configuration does not appear to be necessary.

Another one that works with the cdc_acm module, limited testing with
Hylafax, is the TRENDnet TFM-561U. Under Debian Squeeze this is
plug-and-play.

lsusb info:

Bus 007 Device 002: ID 0572:1329 Conexant Systems (Rock

well), Inc.
idVendor 0x0572 Conexant Systems (Rockwell)

, Inc.
idProduct 0x1329

The (first) device is /dev/ttyACM0. Hylafax's faxaddmodem seemed to


have configured it correctly.

Adding a Dial Prefix

To configure HylaFax to dial a number and pause before dialing the


requested number, use your favorite text editor to add the following line
to your config.<DEVICE> files:

ModemDialCmd: ATDT9,%s

• Pause: The comma (,) dial modifier causes the modem to pause
while dialing ATD9,17731231234
• Pause and wait for dial tone: The W causes most modems to wait for
a dial tone before dialing the number following it. ATDT 9 W
17731231234
• Final Modem Dial Command on the system could look like this:

ModemDialCmd: ATDT9,W%s

• 9 says dial 9; comma says wait; W says wait for dial tone; %s says
dial this number
• If you experience no dial tone in your logs try something like:

ModemDialCmd: ATX3DT8,,,%s

AT - picks up the phone, X3- disables dial tone check, DT tells it to use
tone, dial 8, then ",,," for wait, then the phone number.

Multiple Incoming Fax Lines


Configuring a multi-port serial PCI card

• There's really no limit to the number of serial cards Linux can


support, but there is a kernel configuration parameter for the number
of supported serial ports.(CONFIG_SERIAL_8250_NR_UARTS)
• Currently the limit in Debian supported ports is 4. (read on for more
then 4 port support)
• So if you have a 2 port serial card you want to add to your pc, here is
what you do.
• If you connect more modems or when you buy a serial pci card you
will want to know which ttyS port they are using. You can do it by :

dmesg |grep tty

• You should see something like:

faxserver:~# dmesg |grep ttyS

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A


ttyS14 at I/O 0xdf08 (irq = 209) is a 16550A

ttyS15 at I/O 0xdf10 (irq = 209) is a 16550A

• If you installed another serial pci card (2 port or 4 port), you can see
if it was detected by typing:

lspci -v

This should list something like:

0000:02:00.0 Serial controller: NetMos Technology PCI 9

835 Multi-I/O Controller (rev 01) (prog-if 02 [16550])

Subsystem: LSI Logic / Symbios Logic 2S (16C550


UART)

Flags: medium devsel, IRQ 209

I/O ports at df08 [size=8]

I/O ports at df10 [size=8]

I/O ports at df18 [size=8]


I/O ports at df20 [size=8]

I/O ports at df28 [size=8]


I/O ports at df30 [size=16]

• As you can see the IRQ should be the same as the one specified in
dmesg.
• Install DebianPkg: setserial. This program will let you control serial
port better.

apt-get update
apt-get install setserial

• Then try:

setserial -g /dev/ttyS*
• If you don't see a ttyS#(ex. ttyS14) in /dev/ you will need to create
ttyS14 device.

ls /dev/ttyS*

• So in my case I am missing ttyS14, ttyS15 in /dev/ folder

MAKEDEV ttyS14

MAKEDEV ttyS15

• Now run setserial -g /dev/ttyS* again and you should see your new
serial ports.
• Plug in your modems and Run:

faxaddmodem

• Select the new ttyS and you are done setting up multiple fax
machines.

FaxNotify

• When fax fails to send, user gets an email notifying of a failure.


Default is to just sent an email with a job number. To make sure they
get a copy of what they actually sent we need to add FaxNotify to
/etc/hylafax.
• Create FaxNotify in /etc/hylafax/
• Inside put

RETURNFILETYPE=tiff;

Common Errors
• You can find hylafax specific error codes here: Hylafax Error
Codes
Minicom works, but faxaddmodem does not see a
modem

• Minicom automatically uses an init string that turns Numeric Result


Codes off (ATV1). If you have an US Robotics Courier V.Everything
External, check the position of jumper switch #2.

Failure to receive silence

• Added to config.ttyS14; failure to receive silence


• # http://www.hylafax.org/archive/2002-08/msg00260.php
• Add this to your configuration: config.ttyS#

Class1SwitchingCmd: "<delay:7>"

T.30 T2 timeout, expected signal not received

• Switching to Class 1, and adding the "delay" will solve the problem.
• Run the faxaddmodem command again and add the delay.

Unspecified Phase C error, including too much


delay between TCF and +FDR command

• Switching to Class 1 solved the problem.

No Dial Tone

• Adding dial string 9 then pause then number to config file solved the
problem
• See "PBX, Dial 9 before number" section and if you need more
details on options see
http://members.tripod.com/michaelgellis/modem.html

No carrier Detected

• Adding longer wait has solved the problem of no dial tone, but you
might still get the no carrier detected. Look into logs to determine if
this is the case in your setup. See if these are busy signal. For
some reason busy signal gets labeled as no carrier detected.
cat /var/spool/hylafax/log/xferfaxlog

Modem Wedged

After a month of good work (11,000 faxes) suddenly the modem become
wedged. Because USR modem doesn't have the un-wedged option as
the Mainpine modem, you have to tell hylafax to try to set it up more
then (default)2 times. Add this to your config.tty#

MaxSetupAttempts: 10

4 ports serial card, more then 4 modem support

• There's really no limit to the number of serial cards Linux can


support, but there is a kernel configuration parameter for the number
of supported serial ports.(CONFIG_SERIAL_8250_NR_UARTS)
• To find out how many serial port your kernel is configured for do:

dmesg |grep Serial

• And look for line like:

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, I


RQ sharing enabled

• Shows that the driver is compiled to support only 4 ports.


• I was getting following logs which I will include here for reference.

serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A

00:08: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A


0000:05:04.0: ttyS0 at I/O 0x1010 (irq = 201) is a 165
50A

0000:05:04.0: ttyS1 at I/O 0x1018 (irq = 201) is a 165


50A

0000:05:04.0: ttyS3 at I/O 0x1020 (irq = 201) is a 165


50A

Couldn't register serial port 0000:05:04.0: -28

shows that ttyS2 is on the motherboard. ttyS0, S1, and


S3 are

on the 9845 card. The driver found the fourth port on

the 9845 card,

but couldn't use it because all four ports (ttyS0-ttyS3

) were already

in use (that's what the "-28" error means).

• You can list your pci cards by doing the following. This will show you
all pci cards. Look for the one that mentions serial

lspci -v

• These are mine:

2 port:
02:00.0 Serial controller: NetMos Technology PCI 9835

Multi-I/O
Controller (rev 01) (prog-if 02 [16550])

Subsystem: LSI Logic / Symbios Logic 2S (16C55


0 UART)
Flags: medium devsel, IRQ 209

I/O ports at df08 [size=8]


I/O ports at df10 [size=8]

I/O ports at df18 [size=8]


I/O ports at df20 [size=8]

I/O ports at df28 [size=8]


I/O ports at df30 [size=16]

4 port:

02:02.0 Serial controller: Unknown device 9310:9845 (r


ev 01) (prog-if 02
[16550])

Subsystem: LSI Logic / Symbios Logic Unknown d


evice 0004

Flags: medium devsel, IRQ 201


I/O ports at 1000 [size=8]
I/O ports at 1008 [size=8]

I/O ports at 1010 [size=8]

I/O ports at 1018 [size=8]

I/O ports at 1020 [size=8]

I/O ports at 1030 [size=16]

To update under Grub

• Lets add a more serial ports to our system. We do it by adding the


8250.nr_uarts=16 at end of kopt line in the grub menu configuration
file.
• Edit /boot/grub/menu.lst and change the following lines by adding the
8250.nr_uarts=16 at the end of kopt.

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##


## default kernel options

## default kernel options for automagic boot options


## If you want special options for specific kernels use

kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be

omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro

## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda1 ro 8250.nr_uarts=16

• Then

update-grub
• Reboot

To update under Grub2

• Lets add a more serial ports to our system. We do it by adding the


8250.nr_uarts=16 at end of GRUB_CMDLINE_LINUX_DEFAULT
line in the grub defaut configuration file.
• Edit /etc/default/grub and change the following lines by adding the
8250.nr_uarts=16 at the end of
GRUB_CMDLINE_LINUX_DEFAULT.

# If you change this file, run 'update-grub' afterwards

to update

# /boot/grub/grub.cfg.

GRUB_DEFAULT=0

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || ech

o Debian`

GRUB_CMDLINE_LINUX_DEFAULT="quiet 8250.nr_uarts=16"
GRUB_CMDLINE_LINUX=""

• Then

update-grub

• Reboot

Then confirm everything is working

• When you log in run the command:

setserial -g /dev/ttyS*

• This will show you list of all serial ports addresses and corresponding
ttyS
• Mine looks like:
faxserver:/home/lucas# setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4

/dev/ttyS1, UART: 16550A, Port: 0x1010, IRQ: 201

/dev/ttyS10, UART: unknown, Port: 0x0000, IRQ: 0

/dev/ttyS11, UART: unknown, Port: 0x0000, IRQ: 0


/dev/ttyS12, UART: unknown, Port: 0x0000, IRQ: 0

/dev/ttyS13, UART: unknown, Port: 0x0000, IRQ: 0

/dev/ttyS14, UART: unknown, Port: 0x0000, IRQ: 0

/dev/ttyS15, UART: unknown, Port: 0x0000, IRQ: 0


/dev/ttyS2, UART: 16550A, Port: 0x1018, IRQ: 201

/dev/ttyS3, UART: 16550A, Port: 0x1020, IRQ: 201

/dev/ttyS4, UART: 16550A, Port: 0x1010, IRQ: 201

/dev/ttyS5, UART: 16550A, Port: 0x1018, IRQ: 201

/dev/ttyS6, UART: 16550A, Port: 0x1020, IRQ: 201

/dev/ttyS7, UART: 16550A, Port: 0x1028, IRQ: 201


/dev/ttyS8, UART: unknown, Port: 0x0000, IRQ: 0

/dev/ttyS9, UART: unknown, Port: 0x0000, IRQ: 0

• So now from lspci -v I know that first port on my 4 port serial card is
1010 which is ttyS1, second 1018 is ttyS2....etc
• Its really easy.
• The maximum number of the serial ports you can set the kernel boot
to is 16,if you need more, kernel 2.6.24 will have 32 as upper
limit.see Closed in linux-2.6/2.6.24~rc8-1~experimental.1: #440807:
increase CONFIG_SERIAL_8250_NR_UARTS (number of serial
ports): Debian Bug 440807.

Tools
Archive Faxes

• If you have a need to archive each fax by date, there is a script that
does just that.
http://www.hylafax.org/archive/2007-02/msg00399.php
• Download the archive.py file to some folder. I use /usr/local/bin/
• Edit a cron job:

crontab -e
• Now set up the time it will run. The extension it should use. And a
folder where the faxes are.

1 0 * * * python /usr/local/bin/archive.py /var/spool/h


ylafax/recvq tif

• Above line will run the program every day at 00:01 am. Change the
"/usr/local/bin/archive.py" to where you have downloaded the
program. Change "/var/spool/hylafax/recvq" to where your faxes are
located. Change "tif" to the extension you are using for storing your
faxes.
• If you just need to run it once. This command will do.

python /usr/local/bin/archive.py /var/spool/hylafax/rec


vq tif

Send batch faxes

• To send multiple faxes, first you need to create a file that will have
fax numbers per one line. Type it or do a database query.

17731231234

13121231234

• If you need to add 1 in front of the number you could use vim to do it
with this code: press ESC

:%s/^/1/g

• This will replace ^(beginning of a line) with 1


• After your file is ready and you have a pdf of what you want to send.
Issue this command

sendfax -z batchfaxnumbers.csv FILE2007NEWS.pdf


• To make only one modem be responsible for sending that job. And to
enable enough time for it to send we can issue this command which
will use ttyS0 modem and will expire in 24 hours.

sendfax -h ttyS0@localhost -n -k 'now + 24 hours' -z ba

tchfaxnumbers.csv FILE2007NEWS.pdf

Maintenance
• To see a status of the fax service on the local machine, Type

faxstat -s

Restart Hylafax

/etc/init.d/hylafax restart

Checking Fax Status

To check the status of hylafax, we use the faxstat command:

faxstat

• Type in the password(if it asks for one) and you should see
something similar to the following:

faxserver:~# faxstat
Password:
HylaFAX scheduler on localhost.localdomain: Running

Modem ttyS15 (1.773.123.1234): Running and idle


Modem ttyS14 (1.773.123.1234): Running and idle

Removing a fax job

to remove a sent fax from the queue, issue the following command:
faxrm jobid

Where JOBID is the ID of the job in question.

You can also remove multiple faxes at once, like the following:

faxrm 1011 1012 1013

If you have more then a 100 faxes to remove

Don't do this:

• Open excel/openoffice calc file


• Create a range of 1...100; save as csv; Open in vim; Issue a
command :%s/"//g to remove quotes; Issue a command %s/\n/ /g to
replace new line with space; Add at the beginning faxrm ; On your
server issue a command bash filename.csv

Do:

faxrm $(seq 1 100)

Printer not printing

• If you followed SystemPrinting, log into the cups software via the
http://localohost:631 and you can resume printing from there or see
the status of the printer.

Country Specific
General

• For hopefully obvious reasons, the country code and dialling prefixes
will vary by country.

CategoryModem | CategoryNetwork
HylaFax (dernière modification 2014-06-01 20:48:47)

You might also like