Skip to content

Client Access

Setting up Client Access

It is necessary to specify which client machines and users can have access to a HylaFAX server machine. This is specified by the contents of the etc/hosts.hfaxd file. The contents of this file is specified in the hosts.hfaxd(5F) manual page. The default etc/hosts.hfaxd file that comes with HylaFAX permits anyone to have access through the localhost network interface (loopback). Here is an example hosts.hfaxd:

localhost
127.0.0.1

It is a good idea to refine the controls specified in this file before providing general access to the server. Access can be restricted both on a per-client-machine basis and by user. Passwords can also be required though support for this is presently somewhat awkward. The etc/hosts.hfaxd file must be owned by the fax user and be mode 0600 or the hfaxd daemon will not permit client access.

To enable everyone on your local '10.1.x.x' network, you can use the following example:

^.*@10\.1\.[0-9]{1,3}\.[0-9]{1,3}

If you trust your internal networks, a rule at the beginning of the etc/hosts.hfaxd file such as:

^.*@.*$
will allow any user password-less access to the server using any username they wish. To create individual HylaFAX users, you must use the faxadduser command.

Example:

faxadduser -p secret myuser

For more in-depth information, please see the faxadduser, faxdeluser and hosts.hfaxd manpages.

Removing Jobs from the Queue

In order to remove a job from the queue, you must set the FAXUSER environment variable to the owner of the fax job and then use faxrm JOBID. Example:

export FAXUSER=cam
faxrm 2007
To remove all jobs in queue for a specific sender, use the following script:
!/bin/sh
for i in $(faxstat -s -O 'JobFmt: "%j %o"' | grep $1 | cut -f 1 -d ' ');
do
    FAXUSER=$1 faxrm $i;
done

Execute:

./script.sh david

Viewing Received Faxes

In order for client applications to access your received faxes, the TIF file permissions in the recvq/ directory must be world-readable.

This is accomplished by changing RecvFileMode in the etc/CONFIG/site.

Set the following:

RecvFileMode: 0644

You must also restart the faxgetty and/or btgetty processes as discussed in Troubleshooting

Afterwards, execute the following command:

chmod 0644 /var/spool/hylafax/recvq/*.tif

Your client should now have access to retrieve and display your received faxes.