Re: print spooler to email

From: /dev/null (dhart_at_n.o.s.p.a.m.ultranet.com)
Date: 11/25/03


Date: Tue, 25 Nov 2003 16:11:11 GMT

Jean-Pierre Radley wrote:

> /dev/null typed (on Tue, Nov 25, 2003 at 02:49:09AM +0000):
> | G'Day,
> |
> | I trying to set up a spooler interface to email print jobs (to a fixed
> | destination) rather than have them printed.
> |
> | I see from google groups that Jeff Lieberman has sent email to printers
> | - this is not what I want.
> |
> | I've tried a few hack attempts on the dumb spooler interface with no
> | success.
> |
> | Has anyone done this?
>
> I've got assorted printer interface scripts that pipe their ouput to
> visionfs, or to netcat, so it's no big deal to instead pipe to a
> mail|mutt command.
>
> Just enclose the last part of the cript, which actually loops over the
> input file, between squiggly braces, and pipe that to whatever you wish.
>

FWIW, this is how i did netcat last, changing the 'dumb' interface script:

#Use netcat for this network printer
FILTER="/u/netcat -h highspeed -p 9100"

and that works, so, it's what I tried first:

FILTER="/usr/bin/mail -s report boopy"

(boopy being a user on the system) which gives no errors and no mail.

So I tried this:

  cat ${file}| /usr/bin/mail -s report boopy
  #0<${file} eval ${FILTER} 2>&1

To test i typed in l|lp -d email (clever name, eh?)
and root gets this msg:

  Your request email-4505 destined for email
  encountered an error while printing on printer email.

  Reason for failure:

  /usr/spool/lp/admins/lp/interfaces/email: /usr/bin/mail: text busy

Well, I can fix the error msg by changing it to this:

  cat ${file}| /usr/bin/mail -s report boopy 2>&1

but I still get no email.

Or did you mean:

{ while [ $i -le $copies ]
...
done } | mail -s report boopy

?

that also gave an error which is inscrutable to me...

Regards, Dirk



Relevant Pages

  • Re: Ancient SCO Unix Question
    ... SCO UNIX System V/386 Release 3.2v4.2 Operating System ... The problem seems to be getting print request from the lpd spool ... unless I can find a precompiled netcat binary which will ... locally connected printer since it uses the same interface scripts you ...
    (comp.unix.sco.misc)
  • Re: dding to a USB floppy....
    ... output file) are devices rather than files. ... It's even more fun when you combine it with netcat ... On another machine, get dd to pipe it's output through netcat, sending to your first host: ... and you copy disk sda1 disk) over the network, and get a block-level copy on the remote machine. ...
    (uk.comp.sys.mac)
  • Re: Netcat as a server / redirection question
    ... Steve Foley wrote: ... >> I would like to use Netcat as a simple test server. ... >> pipe and only write response.bin to the named pipe once the request had ...
    (comp.unix.questions)
  • Re: Netcat as a server / redirection question
    ... > I would like to use Netcat as a simple test server. ... > pipe and only write response.bin to the named pipe once the request had ...
    (comp.unix.questions)
  • Re: data transfer rates windows vs linux
    ... Netcat on Linux (different hardware, but I would guess it does ... Netcat Windows-adjusted sources from securityfocus.com, ... Iocpsock TCL extension reads 490MBit/s, better, but not good enough ... output to the pipe to Tcl? ...
    (comp.lang.tcl)