Hi Derek,
not as far as I know (unless you do some tweaking in the code;-)
I had the same problem and did a simple (?) workaround. I use another
field in the controlfile, which is used to supply a mailadress, for
sending a mail to the user after the job has completed. As we don't use
this I use the field to supply the hostname:
print command = /usr/spool/lp/bin/lpr -r -Fl -J"%J" -m%m -U%U -P%p %s
Of course lprng tries now to send a mail to the supplied 'e-mail-adress',
to do something else instead you need to define something different than
sendmail in the lpd.conf of the printserver:
[printsrv2] ~ $ grep sendmail ~lp/etc/lpd.conf
# Purpose: sendmail program
# default sendmail=/usr/sbin/sendmail -oi -t (STRING)
sendmail=/usr/spool/lp/bin/notification
[printsrv2] ~ $ cat /usr/spool/lp/bin/notification
#!/bin/sh
# test NT user notification through SAMBA
# exec 2>>/tmp/notify.log
# set -x
PATH=/bin:/usr/bin:/usr/local/bin
export PATH
HOST=`cat | awk -F: '$1~ /To/{print $2}'`
echo Your printjob has finished printing on $PRINTER \\n
\\nPrintservice was brought to you by group IT using SAMBA 2.2.4 |
/usr/bin/smbclient -Ulp -M$HOST
exit 0
In my case the script sends a popup to the originating host. Of course you
could also define a controlfile filter on the server and change the values
in the controlfile appropriate (m <-> H) if you need the information in
the right place. The control file filter just reads from <STDIN> and
writes to <STDOUT> for ex:
hsps1|64c_25_p1:\
:lp=hsps1%9100:\
:control_filter=/usr/spool/lp/bin/control_file_filter.sh:\
:bp=/usr/spool/filters/psbanner:\
:of=/usr/spool/ifhp/libexec/filters/ifhp:\
:ifhp=model=hp4050:\
:filter=/usr/spool/ifhp/libexec/filters/ifhp:\
:translate_incoming_format=lf:\
:ab:\
:mx#0:\
:du#16:\
:
[printsrv2] ~ $ cat /usr/spool/lp/bin/control_file_filter.sh
#!/bin/sh
while read LINE
do
echo $LINE | /usr/bin/sed /\^M/d
done
hope this helps, check out the Howto for further details ;-)
~christoph
--
/* Christoph Beyer | Office: Building 2b / 23 *\
* DESY | Phone: 040-8998-2317 *
* - IT - | Fax: 040-8998-4060 *
\* 22603 Hamburg | http://www.desy.de */
On Wed, 7 Jan 2004, Derek Wanless wrote:
> I have a Samba server which users LPRng 3.8.19 as released with Redhat
> 9. The server does not do any actual printing but forwards the print
> jobs to one of 2 print servers depending upon whether the printer to be
> used is accounted or not. My problem is that I need the server that
> deals with accounted printers to know the name/IP address of the PC that
> generated the print job rather than the name of the samba server that
> issued the lpr command i.e. override the value of the 'H' line in the
> control file with the %M samba value. Can this be done and, is so, then how?
>
> --
> Derek
> _________________________________________________________________
> Dr. D. Wanless Tel: +44 (0)1782 583071
> Computing Services Fax: +44 (0)1782 584234
> Keele University Email: [EMAIL PROTECTED]
> Keele,Staffs. ST5 5BG
>
>
> -----------------------------------------------------------------------------
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
>
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body. For the impatient,
> to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> with: | example:
> subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
>
> If you have major problems, send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> -----------------------------------------------------------------------------
>
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------