Adding mgetty fax to printcap
Stephen Davies (scldad@sdc.com.au)
Mon, 10 May 1999 17:49:31 +0930
Teresa Ray <tcray@speedchoice.com> wrote:
> I am having a problem adding an entry to /etc/printcap for a fax printer.
> I am attempting to follow the directions given in /usr/doc/samba/Faxing.txt, which
> uses mgetty+sendfax. If I use the original /etc/printcap generated by my distribution
> (Debian 2.0.34), everything works fine and lpstat -o returns with:
> printer lp@ionsvr online. enabled since ....
>
> When I add an entry to printcap and run lpstat -o I get:
> printer lp@myname online. enabled since...
> printer faxlp@myname online. enabled since...
>
> When I then run lpc reread and then run lpstat -o I get:
> printer lp@myname online. enabled since...
> Without the 'faxlp' printer that should be there.
>
> Now, if I reboot the linux box with this altered printcap file and run
> lpstat -o I get:
> Host 'localhost' - cannot open connection to 'lp@localhost' -
> connection refused
> Host 'localhost' - cannot open connection to 'faxlp@localhost' -
> connection refused
> And, any file I attempt to send to the fax via Samba indicates it can't find faxlp@localhost.
>
> The printcap entry I'm attempting to add is:
> faxlp|Fax Server
> :lp=/dev/null
> :sd=/var/spool/fax
> :if=/etc/mgetty/faxfilter
> :sh
> :sf
> :mx#0
> :lf=/var/log/fax-log
>
> And the smb.conf entry reads:
> [fax]
> comment = Fax Server
> path = /tmp
> printable = yes
> public = yes
> writable = no
> create mode = 0700
> browseable = yes
>
> What (probably perfectly obvious) thing am I doing wrong?
>
I think that your problem is in the way you have formatted your /etc/printcap
entries. Printcap entries are "one-liners" so, if you want to enter them over
several lines, you must escape the line feed.
Eg:
fax|outgoing fax server:\
:lp=/dev/null:\
:mx#0:sd=/usr/spool/fax:\
:if=/usr/local/lib/mgetty+sendfax/faxfilter:\
:lf=/usr/spool/fax/fax-log:sh:sf
Cheers,
Stephen.
========================================================================
Stephen Davies Consulting scldad@sdc.com.au
Adelaide, South Australia. Voice: 041-980 1417
Computing & Network solutions. Fax: 08-82728863