Linux simple fax printer server mini-HOWTO (faxsrv-mini-HOWTO) <author>Erez Strauss, <erez@newplaces.com></author> <date>v1.0, November 8 1997</date> <trans>JF Project, <JF@linux.or.jp></trans> <tdate>v1.0j, November 8 1997</tdate> <abstract> <!-- <bf>No warranties.</bf> Comments are always welcome. This document describes in details one of the simplest ways to setup fax server on your Linux system. The fax is available to the users on the local host and to network users. --> 本文書は無保証です。御意見は歓迎致します。 この文書は Linux システム上でファックスサーバーを構築する最も簡単な方法を 詳しく記したものです。これによって、ローカルホストからも ネットワーク上からも Fax が使えるようになります。 </abstract> <!-- Table of contents --> <toc> <!-- Begin the document --> <sect><!--Introduction-->はじめに <p> <!-- To get a working printer/fax on the linux machine you should have some software and fax modem. --> Linux 上でプリンタ兼ファックスサーバを構築するには、適切なソフトウェアと ファックスモデムが必要です。 <p> <!-- The Printing software will be using the fax software as a print filter. The efax will find the fax number from the print Job number and will send the fax. The efax software was written be Ed Casas <edc@cce.com>. --> そして、プリンタ用ソフトウェアを設定して、ファックス用ソフトウェアを プリントフィルタとして使うようにします。efax は、プリントジョブ番号から ファックス番号を読み出して、ファックスを送信します。efax は、 Ed Casas <edc@cce.com> が作成しています。 <p> <!-- The rest of the document is build as Q&A. --> これ以降は、Q&A 形式で説明します。 <sect><!--Questions & Answers-->質問と解答 <sect1><!-- What is a fax printer server ?--> ファックス・プリンタサーバとは? <!-- <p> A fax printer server is a setup of few programs: efax, and the print server, in such a way that sending a fax from the computer is as simple as sending printout to a printer. --> <p> ファックス・プリンタサーバとは、複数のプログラムを組み合わせて 構築したサーバのことです。efax とプリントサーバを組み合わせると、 プリンタにプリントアウトする要領で簡単にコンピュータからファックス を送ることができます。 <sect1><!-- How to set it up ?--> どうやって設定するの? <p> <!-- Setting efax as fax print server includes few problems As I worked it out few times, I decided to collect this wisdom in this small mini-HOWTO, comments are welcome at <tt/<erez@newplaces.com>/. I describe them here and the solutions, and all the instruction in short steps: --> efax をファックス・プリントサーバとして設定する際には、いくつか 問題があります。私は何度か構築に成功したので、そのノウハウを 集めて、簡単な mini-HOWTO を作ることにしました。コメントは、 <erez@newplaces.com> までお願いします。 以下で順を追って構築方法と利用方法、その他の注意点等を述べます。 <sect2><!--The efax Software-->efax ソフトウェア <p> <!-- make sure you have the efax package. --> まず、efax パッケージがインストールされているか 確認します。 <p> <!-- On RPM based system use the command 'rpm -qv efax'. --> RPM ベースのシステムなら、コマンド '<tt>rpm -qv efax</tt>' を 使ってください。 <p> <!-- You can get the efax sources in tar.gz format from sunsite: ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz or binary rpm package: ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm --> tar.gz 形式の efax ソースファイルは、<url url="ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz"> から、バイナリの rpm パッケージは、<url url="ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm"> から入手できます。 <sect2><!-- The printcap entry.--><tt>printcap</tt> ファイルのエントリ <p> <!-- The efax documentation is missing the : at the end of the printcap entry. --> efax 付属文書では、printcap エントリの行末の <tt>:</tt> が抜けています。 <![IGNORE[ [--nofiles] [--noscripts] [--nomd5] [targets] <p>Solution: Add the following <tt>/etc/printcap</tt> entry: ]]> <p> この問題を解決するには、<tt>/etc/printcap</tt> に以下のエントリを 追加してください。 <tscreen><verb> fax:\ :lp=/dev/null:\ :sd=/var/spool/fax:\ :if=/usr/bin/faxlpr: </verb></tscreen> <sect2><!--The fax command-->fax コマンド <p> <!-- Use hard link and not symbolic link to the fax command. --> fax コマンドへはハードリンクを使い、シンボリックリンクは使わないで ください。 <p> <!-- Run the command: --> 次のコマンドを実行してください。 <tscreen><verb> ln /usr/bin/fax /usr/bin/faxlpr </verb></tscreen> <sect2><!--The /usr/bin/fax file.-->/usr/bin/fax ファイル <p> <!-- Edit the /usr/bin/fax to your preferences: --> <tt>/usr/bin/fax</tt> ファイルをご使用の環境に合わて編集します。 <p> <!-- choose the right Fax Class for your modem: --> モデムに応じたファックスクラスを選択します。 <tscreen><verb> CLASS=2.0 </verb></tscreen> <!-- Set the FROM="your international phone number" field --> <tt>FROM</tt> フィールドには、あなたの国際電話番号を設定します。 <tt>NAME</tt> フィールドには、名前を設定してください。 <tscreen><verb> NAME="Your Name" </verb></tscreen> <!-- Add the line for conversion of international phone number to local for example in Israel you would use: --> そして、国際電話番号を国内番号に変換するための一行を加えます。 イスラエルから発信する場合は、以下のようになります。 <tscreen><verb> TELCVT='sed -e s/+972/0/ -e s/+/00/' # Israel </verb></tscreen> <!-- There is a problem in the file in line 586, change the <tt/cfile=.../ with the following two lines: --> <tt>/usr/bin/fax</tt> ファイルの 586 行目には問題があるので、 <tt>cfile=.../</tt> の部分を以下のように変更してください。 <tscreen><verb> cfile=`/usr/bin/tail -1 lock` cfile=`cat $cfile` </verb></tscreen> <!-- at lines 586,587 there shouldn't be '-' signs the lines are: --> 586, 587 行目の - (マイナス)記号は取り去る必要があります。 <tscreen><verb> 0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;; *) echo "$l" | mail -s "fax to $num failed " $user@$host ;; </verb></tscreen> <sect2><!--The /var/spool/fax directory.--> <tt>/var/spool/fax</tt> ディレクトリ <p> <!-- create the directory /var/spool/fax --> 次のようにして <tt>/var/spool/fax</tt> というディレクトリを作成します。 <tscreen><verb> mkdir /var/spool/fax chmod 777 /var/spool/fax </verb></tscreen> <sect2><!-- The lock file.-->ロックファイル <p> <!-- The lock file (<tt>/var/spool/fax/lock</tt>) is being created with incorrect permissions, use the following command to set it correctly: --> ロックファイル (lock file) (<tt>/var/spool/fax/lock</tt>) を作成します。 作成されたファイルのパーミションは適切ではないので、次のコマンドを使って 正しく設定してください。 <tscreen><verb> touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock </verb></tscreen> <sect2><!-- The /dev/modem special file.--> <tt>/dev/modem</tt> スペシャルファイル <p> <!-- The efax program is expecting real device file at the <tt>/dev/modem</tt> and will not work with symbolic link, so create a device file with the same major and minor number as the <tt>/dev/cua?</tt> the is connected to the modem. The file should have the rw-rw-rw- mode to enable any user to use the fax software. --> efax プログラムは、<tt>/dev/modem</tt> ファイルが実際に存在することを前提 にしているので、シンボリックリンクを張っているだけでは動きません。 モデムが接続されている <tt>/dev/cua?</tt> と同じメジャー番号とマイナー番号 が付いた <tt>/dev/modem</tt> デバイスファイルを作成してください。 <tscreen><verb> ls -lL /dev/modem rm /dev/modem mknod /dev/modem c Mj Mi chmod 666 /dev/modem </verb></tscreen> <!-- Mj is 5, and Mi is 64 for the cua0, 65 for cua1 and so on. For example (for cua1): --> <tt>Mj</tt> の部分には 5 を、<tt>Mi</tt> の部分には <tt>cua0</tt> なら 64 を、<tt>cua1</tt> なら 65 等を入れてください。それゆえ、モデムが <tt>cua1</tt> に接続されている場合は、次にようになります。 <tscreen><verb> mknod /dev/modem c 5 65 </verb></tscreen> <sect2><!-- The <tt>/var/lock</tt> directory.--> <tt>/var/lock</tt> ディレクトリ <p> <!-- change the mode at the <tt>/var/lock</tt> directory --> <tt>/var/lock</tt> ディレクトリのモードを変更します。 <tscreen><verb> chmod 1777 /var/lock </verb></tscreen> <sect1><!-- How do I use it, for the server ?--> サーバとして使うには? <p> <!-- You should use the fax printer using the -P option and the -J option with the fax number. --> ファックスプリンタを使うときは <tt>-P</tt> オプションを付け、 <tt>-J</tt> オプションでファックス番号を指定します。 <!-- use one of the following lpr commands: --> 次のような <tt>lpr</tt> コマンドを使ってください。 <tscreen><verb> lpr -Pfax -J <Fax-Number> [file-names] any command | lpr -Pfax -J <Fax-Number> </verb></tscreen> <sect1><!--Where do I specify the target Fax number ?--> 宛先のファックス番号をどこに指定するか? <p> <!-- After the -J option. --> <tt>-J</tt> オプションの後に、宛先の番号を指定してください。 </p> <sect1><!--How do I use it from other Unixes on the net ?--> ネット上のほかの Unix 機からファックスサーバーを利用する方法 <p> <!-- Add the following entry into the <tt>/etc/printcap</tt> file and the client Linux systems, create the spool directory, and so on ... --> <tt>/etc/printcap</tt> に以下の項目を加え、クライアント側の Linux 機には スプールディレクトリ等を追加します。 <tscreen><verb> fax:\ :sd=/var/spool/fax:\ :mx#0:\ :sh:\ :rm=host.domain:\ :rp=fax: </verb></tscreen> <!-- add the name of the client hosts into the <tt>/etc/hosts.lpd</tt> on the fax server machine. --> さらに、クライアントのホスト名をサーバー側の <tt>/etc/hosts.lpd</tt> に 書き加えます。 <p> <!-- use it as before. --> 使い方はいままで通りです。 <p> <!-- Note: The header string that efax adds to the fax pages is not effected by the user name that sends the fax. (can be updated). --> 注意: efax がファックス各ページに書き込むヘッタ文字列は、ファックスを送付する ユーザー名が変わっても同じです。(これは、アップデートの際に修正される かもしれません。) </p> <sect1><!--Caldera, LPRng users-->Caldera の LPRng ユーザについて <p> <!-- The LPRng printing management software is using a different method to handle the control file. --> LPRng 印刷管理ソフトウェアでは、コントロールファイルの扱いが異なって います。 <p> <!-- Thanks to Luca Montecchiani <m.luca@usa.net>, who found the problem and the solution. Here is an update to the <tt>/usr/bin/fax</tt> file. The following line replace the two simple <bf/cfile=.../ lines at lines 586,587 --> この問題点に気づき解決策を提供してくれた Montecchiani <m.luca@usa.net> に感謝します。以下に <tt>/usr/bin/fax</tt> ファイルの更新個所を記載します。 以下の行を 586, 587 行にある <bf>cfile=.../</bf> 部分と置き換えてください。 <tscreen><verb> # Modified to work also with the LPRng package # Luca Montecchiani (08/11/97 m.luca@usa.net) if [ !-z "$CONTROL_FILE" ] then cfile=`cat tail -1 lock` cfile=`cat $cfile` else cfile=$CONTROL_FILE fi </verb></tscreen> <sect><!--Latest version, Contacting the author.--> 最新バージョンと著者の連絡先 <p> <!-- The latest version of this file can be accessed through the world wide web using URLs --> この文書の最新バージョンは、以下の URL で入手できます。 <tscreen><verb> http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.sgml http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.html http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.txt http://www.newplaces.com/linux/faxsrv/faxsrv-mini-HOWTO.info </verb></tscreen> <p> <!-- You can contact me --> 著者との連絡先は以下です。 <tscreen><verb> Erez Strauss erez@newplaces.com http://www.newplaces.com/linux/ http://www.newplaces.com/ Phone: +972 52 739737 Fax: +972 9 954 3034 </verb></tscreen> <sect1>日本語訳について <p> <verb> 日本語版制作: 佐藤亮一 (rsato@ipf.de) ===================================================================== Ryoichi SATO 佐藤亮一 Stiftstr .36 D-60313 Frankfurt a.M Germany E-mail : rsato@pif.de PGP fingerprint = FD AF 12 4F E0 C6 A3 1A AF 27 51 7D 18 08 D1 CA ===================================================================== 更新:千旦裕司 <ysenda@pop01.odn.ne.jp> (2001/09/27) </verb> </article>