In regard to: LPRng: dynamic routing based on fqdn of client, JAMIE...:

>Is there anyway to route printjobs sent to one queue on one print server
>to different print devices based on the client's fqdn?
>Example:
>we3100-**.war.cmsu.edu prints to we3100printer.war.cmsu.edu
>we3107-**.war.cmsu.edu prints to we3107printer.war.cmsu.edu

Jamie-

I received your direct email request and I've seen your post on the list,
but I need to get final confirmation that it's OK for me to share the
script I wrote that does exactly this.    When I have that confirmation
I would be willing to share it.

If you know a decent scripting language (like perl or python), you could
have what you need in a couple hours.  This is all documented in the
LPRNG HOWTO, mainly section 4.18 (Routing Jobs to Print Queues) and
section 12.13 (Dynamic Routing).

Basically, the routing script needs to read standard input, which will give
it a copy of the control file.  One of the settings in the control file
is the `H' line, which is the originating host.  For windows PCs, this is
often the NetBIOS name, FYI.

Once you have the originating host from the H line, you need to turn that
into a key, that you can use to look up what queue to use in some kind
of database (a perl hash or a flat file will work, for a first
approximation, which is all I did).

Once you know what queue you want to send the job to, your routing script
needs to output

        queue the_queue_name_goes_here\n
        end\n

and exit.  It's that simple.

Let me know if you want me to pursue getting permission to share the
script I wrote.  I think you can likely write your own in less time
than it will take me to get that, though.

Tim
-- 
Tim Mooney                              [EMAIL PROTECTED]
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to