Japanese

## efax enhanced

See also TkFax - a Tcl/Tk based GUI
30 Jan 2002 (origin: 6 Oct 2001) Most recent version of this document is at http://shino.pos.to/linux/efax.html

The fax program on ANSI C/POSIX - efax is small and simple, espacially nice for single user systems, which supports Class 1, 2 or 2.0 fax modems, whereas mgetty+sendfax does not support Class 1 modems. See the original efax page.

Here is the enhanced version including bugfix of 'fax start/stop' command in auto answer mode, and improved faxlpr that use two directories separately as INCOMINGDIR for the recieving faxes by auto answer mode and OUTGOINGDIR for the sending faxes with spooling. Now, the faxlpr in the newly patched fax script works with LPRng used in some current systems like Red Hat Linx 7.x. And the new feature of efax-0.9a001114a6 enables to send fax via samba from remote hosts running Microsoft-Windows.
efax-0.9a001114a7 avoids 'bad units' error under some european locales. Try this new version.

- DOWNLOADS

- efax-0.9a-001114a7.tar.gz ... source tarball patched (30 Jan 2002)
- efax-0.9a001114a7-1.src.rpm
- efax-0.9a001114a7-0vl1.i386.rpm ... for RedHat6.2, Vine2.x, Kondara1.2/2000
- efax-0.9a001114a7-1.i386.rpm ... for RedHat7.x, Kondara2.x, Mandrake7.x/8.x

Older versions

- efax-0.9a-001114a6.tar.gz (6 Jan 2002) Enabling fax spooling via samba
- efax-0.9a-001114a5.tar.gz (15 Dec 2001) faxlpr with LPRng
- efax-0.9a-001114a4.tar.gz (7 Oct 2001)
fax start/stop bugfix

- SETTINGS after installing efax using the RPM

1. Set your fax number and the header in the file /etc/efax.rc

    FROM="your Fax number"
    NAME="your name"

2. Make the modem device that efax uses to be writeable by any users.
If the /dev/modem is a symlink of some like /dev/ttyS0, the device file /dev/ttyS0 should be mode 666.

    (If the modem device is /dev/ttyS0)
    # chmod 666 /dev/ttyS0
    # ln -s /dev/ttyS0 /dev/modem

3. Uncomment the line in '/etc/inittab' if you want to enable auto answer mode.

    s1:345:respawn:/bin/sh /usr/bin/fax answer

4. Let the allowable users join in the group 'uucp'.
Find the ppxpadduser command. It will be found in /usr/sbin/ppxpadduser, /usr/doc/efax*, or in /usr/share/doc/efax*.

    # /usr/doc/efax*/ppxpadduser username

- SETTINGS after installing efax using the TARBALL
(These steps do not need if you install efax by the rpm.)

1. Make the file /etc/efax.rc like efax.rc.sample.
Include the line,

    FROM="your Fax number"
    NAME="your name"
    INCOMINGDIR=/var/spool/fax/incoming
    OUTGOINGDIR=/var/spool/fax/outgoing

(Do not use ~/.efaxrc. It does not affect when efax run as a daemon.)
2. Make sure the directories and the modem device that efax uses to be writeable by any users.
If the /dev/modem is a symlink of some like /dev/cua1, the device file /dev/cua1 should be mode 666.

    (If the modem device is /dev/cua1)
    # chmod 666 /dev/cua1
    # ln -s /dev/cua1 /dev/modem

3. Make directories and the lockfile efax uses.

    # chmod 777 /var/lock
    # mkdir -p /var/spool/fax/incoming
    # chown root.uucp /var/spool/fax/incoming
    # chmod 775 /var/spool/fax/incoming
    # mkdir -p /var/spool/fax/outgoing
    # chown lp.lp /var/spool/fax/outgoing
    # chmod 770 /var/spool/fax/outgoing
    # touch /var/spool/fax/outgoing/lock
    # chmod 644 /var/spool/fax/outgoing/lock
    # mkdir -p /var/log/fax
    # chmod 777 /var/log/fax

4. Let the allowable users join in the group 'uucp'.
Find the ppxpadduser command in the directory the tarball is extracted.

    # ./ppxpadduser username

5. Make a symlink faxlpr

    # ln -s /usr/bin/fax /usr/bin/faxlpr

6. Add the statements like printcap.sample to /etc/printcap.
(Some system uses '/etc/printcap.local' instead.)

    ##PRINTTOOL3## LOCAL
    fax:\
            :sd=/var/spool/fax/outgoing:\
            :mx#0:\
            :sh:\
            :lp=/dev/null:\
            :if=/usr/bin/faxlpr:

7. restart lpd

    # /etc/rc.d/init.d/lpd restart

or

    # kill $(/sbin/pidof lpd) -1

8. Uncomment the line in '/etc/inittab' if you want to enable auto answer mode.

    s1:345:respawn:/bin/sh /usr/bin/fax answer

- HOW TO USE
Here shows some example on command lines. See the TkFax page as for the GUI.

1. Converting postscript documents into fax files

    $ fax make doc.ps

doc.ps.001, doc.ps.002 etc. will be created. These files are tiffg3 format, and you can look them up by using xloadimage, kfax, or ghfaxveiwer.

2. Sending faxes manually

    $ fax send 03-3999-9999 doc.ps.0*

3. Sending faxes in background

    $ lpr -P fax -J 03-3999-9999 doc.ps

4. Sending faxes from remote hosts(PC-UNIXes)

On the remote host (bar), make a remote printer named like 'fax', remote host name to be of the host efax running (foo), remote queue 'fax' and use 'postscript printer' as the print filter. Now you can use on the host bar same as local,

    $ lpr -P fax -J 03-3999-9999 doc.ps

5. Sending faxes from remote hosts(Microsoft Windows)

Install and run samba on the host efax is running (foo). Confirm the host(foo) and the fax can be seen from the windows machine(win) in the Network-Computers. On the windows machine(win), make a remote printer named like 'fax', selecting remote printer 'fax' under the host efax and samba is running(foo), and use 'Postscript Printer' as the printer model.

On the windows machine(win), save the document as the file neme is the same as the fax number as like '03-3999-9999.doc' . The extention can be '.doc' if the document is a Microsoft-Word document.

Print the file '03-3999-9999.doc' selecting the remote printer 'fax'.

6. Special charactors

Use '_043' in place of '#', and '_052' in place of '*'. For example, '_0431_0522' means '#1*2'.

- CONTACT

E-mail to `tkscanfax <shino@pos.to>` for questions, comments or suggestions.

efax enhanced / TkFax - a Tcl/Tk based GUI / Linux staff / Japanese