1.ds VE LPRng-3.9.0
2.TH PRINTCAP 5 \*(VE "LPRng"
3.SH NAME
4printcap \- printer capability data base
5.SH SYNOPSIS
6printcap database
7.SH DESCRIPTION
8The format of the LPRng
9.I printcap
10database was based on the
11.IR termcap (5)
12data base file format.
13Entries in the 
14.I printcap
15Each entry in the data base is used to define various options and
16values to control the printing and spooling of print jobs.
17.SH "LPD.CONF, SYSTEM AND USER PRINTCAP FILES"
18Default configuration values are read from the
19LPRng configuration file
20_LPD_CONF_PATH_,
21consult the lpd.conf(5) man page for details about them.
22The system printcap file
23_PRINTCAP_PATH_
24contains information common to all users and the LPRng printing
25system.
26Finally,
27the user printcap files is in
28${HOME}/.printcap
29and contain user configurable information for printer information.
30The values in the user printcap file override values in the
31printcap file
32which override the default values in the
33_LPD_CONF_PATH_
34file.
35.LP
36The user printcap file is used by client programs such as
37.I lpr ,
38.I lprm ,
39.I lpq ,
40and
41.I lpq
42to allow the user to define either a special set of printers,
43provide additional configuration information,
44or to modify default settings in the _PRINTCAP_PATH_,
45or
46_LPD_CONF_PATH_
47file.
48.SH CAPABILITIES
49The printcap database files format is based on the
50.I termcap (5)
51database format,
52modified as follows.
53Leading whitespace on each line is discarded,
54and blank lines or lines which then start with a
55comment character (#) are discarded.
56A line which does not start with a colon (:) or bar (|) starts
57a printer entry definition.
58Lines ending with a backslash (\e) are assumed to continue
59to the next line; this is for compatibility with other
60historical printcap file formats.
61Trailing blanks and tabs (whitespace) for an option value
62are deleted unless the last one is escaped with a backslash
63(``\\'').
64If a colon character value is required then the \e:
65escape sequence can be used, e.g.: dest=ftp\e://address/file.
66.LP
67A printer definition starts with a  primary printer name,
68followed by zero or more alternative printer names,
69followed by a set of keyword entries and values.
70For example:
71.nf
72.sp
73.ft CW
74#comment
75# primary printer name
76lp
77#alternate names
78 |lp2|lp3
79 |Example of a printer
80 :sd=/usr/spool/LPD/lp
81 :rw:lp=/dev/lp:mx#100
82include /etc/printcap/mainprintcap
83.sp
84.fi
85.LP
86The special printcap definition
87.I include
88will read the named file,
89which must have an absolute pathname,
90as the next set of printcap entries.
91.LP
92Keywords can be 1 to an indefinate number of characters long,
93and are case sensitive.
94Values for keywords can be strings
95(:st=string:),
96signed integer values using the C language notation,
97(:nu#12:max#-2:mask#0x1EF:),
98or flags
99(:flag: to set to 1, :flag@: to clear to 0).
100Integer values must be representable as 32 bit 2's complement numbers;
101care should be taken with extremely large numbers.
102.LP
103If the primary name of a printcap entry starts with a punctuation character,
104then the entry may be referenced using the
105.I tc
106capability, but is ignored otherwise.
107This allows common printcap information to be placed in a single entry.
108.LP
109The special printcap entry
110.I oh
111(i.e. - only this host) may be used to select a printcap entry for
112use by one or more hosts.
113The oh entry can be a list of one or more host names or glob type of
114patterns.
115These patterns are first applied to the host's fully qualified domain name,
116and then used to to a lookup of an IP address.
117If either the glob match or the host has a matching IP address then the
118printcap entry is selected for use.
119In addition,
120the
121.I server
122flag indicates that only the LPD server is to use this printcap entry.
123This allows client and server printcap information be to be segragated
124in a simple manner.
125.LP
126The following is a list of the keywords currently used by the LPRng software.
127Many of these keywords are used only by the
128.I LPD
129server,
130others are used by the client programs
131.I LPR,
132.I LPC,
133.I LPRM,
134.I PAC,
135as well as the server.
136In the Use column in the table below,
137an
138.B A
139stands for all programs,
140.B D
141stands for
142.IR lpd ,
143and
144.B R
145stands for the client programs such as
146.I LPR.
147.LP
148Some of these entries can only appear or have an effect if they are
149in the lpd.conf initialization file.
150See lpd.conf(5) for further details.
151.SH "ENTRIES BY ALPHABETICAL ORDER"
152.sp
153.nf
154.ta \w'\0\0\0\0'u +\w'\0\0\0\0'u +\w'Type 'u +\w'Default     'u +4n +4n +4n +4n +4n +4n 8i
155\fBFL	Use	Type	Default	Description\fR
156Xf	D	str	NULL	output filter for format X (used by lpd).
157				'filter' sets default filter
158ab	D	bool	false	always print banner, ignore lpr -h option
159achk	D	bool false
160				If TRUE LPD and the :as specifies a remote host or
161				filter or the :af specifies a remote host or filter
162				then after writing the accounting information to the
163				destination a resply will be read.  The value of the
164				reply determines how the job is to be handled. 
165ae	D	str		accounting format for end of job or a program to run
166				to record accounting information (see also af, la, ar
167				and Accounting).
168af	D	str	NULL
169				accounting file, filter, or remote accounting server
170				(see also la, ar, as, ae, achk). If format is |/path then
171				the program will be started and accounting information
172				will be written to the program STDIN.  If the format
173				host%port, a tcp/ip connection will be made to port
174				on host and the accounting information written to the
175				remote host.  In both of these cases the write operation
176				must succeed or an error will result.  If the format
177				is neither of these cases then the value will be treated
178				as a file and accounting information appended to the file
179				if it exists.  The accounting file will not be created,
180				it must exist for LPD to append data to it.
181				The :as and :ae fields have the accounting information.
182ah	D	bool	false	auto-hold - job held until explicitly released
183all	A	str	NULL	a list of all printers; (see ALL PRINTERS)
184allow_duplicate_flags	A	bool	false
185				allow duplicate command line flags; last overwrites earlier
186allow_getenv	A	bool	(compile time)
187				allows LPRng software to use the LPD_CONF environment variable
188				to specify the location of a configuration file.  This is
189				for testing only.
190allow_user_logging	A	bool	false
191				if mail is requested using lpr -mhost%port,prot operations,
192				and the allow_user_logging flag is true,  then job logging
193				information will be sent to host%port,prot.
194allow_user_setting  A  str NULL
195				allow these users to impersonate other users with the
196				lpr -U user@host, lpc -U user@host, etc., options
197append_z	A	str
198				append these options to the -Z options for the job
199ar	D	bool	true	write remote transfer accounting (if af, and as/ae set)
200architecture	A	str	(compile time)
201				architecture the software was compiled for. (Obsolete.)
202as	D	str		accounting format for start of job or a program to run
203				to record accounting information (see also af, la, ar
204				and Accounting).
205auth	R	str	NULL
206				client to server authentication type
207be	D	str		banner printing program for end (overrides bp, hl)
208bk	R	bool	false	Berkeley-compatible: be strictly RFC-compliant
209				or more exactly, BSD LPR compatible when sending jobs.
210bk_filter_options	D	str	(see source code)
211				when bk flag set, options for non OF print filters
212bk_of_filter_options	D	str	(see source code)
213				when bk flag set, options for OF print filters
214bkf	R	bool	false
215				use bk_filter_options and bk_of_filter_options when
216				invoking print filter.
217bl	D	str		banner line - sent to banner printer program
218				default: $-'C:$-'n Job: $-'J Date: $-'t
219				expands to:  Class:User  Job: job Date: date
220				This is to force compatibility with vintage print filters
221				that require a non-standard banner string. Usually used with
222				:sb: option.
223bp	D	str		banner printing program (see hl)
224				(default: configuration variable default_banner_printer)
225bq_format	D	str	l	format of output from bounce queue filters
226br	D	num	none	if lp is a tty, set the baud rate (see ty)
227break_classname_priority_link	A	flag	false
228				Do not set priority to first letter of class name
229bs	D	str		banner printing program for start (overrides bp, hl)
230cf	D	str	NULL	cifplot data filter
231check_for_nonprintable	R	bool	false
232				lpr checks f and p formats for printable files
233check_for_protocol_violations	R	bool false
234				check for RFC1179 protocol violations
235chooser	D	str	load balance queue destination chooser program
236chooser_interval	D	num	10
237				load balance queue does checks for a 
238				destination queue available at this interval
239chooser_routine	D	bool	false
240				use the user provided chooser routine for this queue
241class_in_status	A	bool	true
242				show class name in lpq status rather than priority
243cm	A	str	NULL	comment identifying printer (LPQ)
244config_file	A	str	_LPD_CONF_PATH_
245				location of LPRng configuration information.  Compile
246				time option only - see allow_getenv.
247connect_grace	A	num	0
248				time between jobs to allow printer recovery
249connect_interval	A	num	10
250				time between open or connection attempts
251connect_timeout	A	num	10
252				timeout value for connection or open
253control_file_line_order	D	str	NULL
254				Put the control file lines in a specific order
255control_filter	D	str	NULL
256				Filter for control file. Used when sending job to remote
257				spool queue.
258create_files	D	bool	false
259				create log, debug, etc., files automatically
260db	A	str	NULL	LPD debug options when serving this queue.
261				See lf (log file) entry as well.
262default_format	R	str	f
263				default format for printing jobs
264default_permission	D	str	A
265				default permission for operation
266default_printer	A	str	lp
267				default printer for printing jobs
268default_priority	R	str	A
269				default priority for printing jobs
270default_remote_host	A	str	localhost
271				default remote host for printing operations
272default_tmp_dir	A	str	/tmp
273				default temporary directory
274destinations	D	str	NULL
275				names of printers that lpq/lprm should talk to
276				find a job that has been processed by a router
277				script (see README.routing)
278df	D	str	NULL	tex data filter (DVI format)
279done_jobs	D	num	1
280				retain status for last N jobs
281done_jobs_max_age	num	0
282				remove status older than N seconds (0 - no removal)
283exit_linger_timeout	A	num	10
284				socket SO_LINGER timeout value
285fd	D	bool	false	if true, no forwarded jobs accepted
286ff	D	str	``\ef''	string to send for a form feed (see INITIALIZATION)
287filter	D	str	NULL
288				default filter to use for printing file
289filter_ld_path	D	str	(see source)	
290				the LD_LIBARY_PATH environment variable value for filters
291filter_options	D	str	(see source code)
292				when bk flag clear, options for non OF print filters
293filter_path	D	str	(default '/bin:/usr/bin')
294				the PATH environment variable value for filters
295filter_poll_interval	D	num	30
296				interval to poll OF filter 
297filter_stderr_to_status_file	D	bool	false
298				set the filter STDERR to the status file and do
299				no report errors in the queue status file.
300fo	D	bool	false	print a form feed when device is opened
301force_fqdn_hostname	A	bool	FALSE
302				Force a fully qualified host name in control file
303force_ipadddr_hostname	A	bool	FALSE
304				Force the IP address of the host to be used for the
305				hostname in control file
306force_localhost	A	bool	TRUE
307				Forces the clients programs (lpr, lpc, etc.)
308				to send all print jobs and requests to the server running
309				on the localhost entry for action.  This flag effectively
310				forces BSD LPR behaviour.
311force_lpq_status	D	str	NULL
312				Specifies a list of LPQ formats and hosts which get status
313				returned in this format.  For example
314				force_lpq_status=s=pc*;l=mac* will cause hosts whose
315				FQDN matches pc* to get short status and those which
316				match mac* to get long format.
317force_queuename	A	str	NULL
318				When :qq: flag or use_queuename configuration is enabled,
319				specifies the queuename to be used for control file Q
320				information.
321ff_separator	D	bool	false
322				need form feeds to separate job files
323fq	D	bool	false	print a form feed when device is closed
324full_time	D	bool detailed time format specification in log messages
325fx	A	str	NULL	valid output filter formats
326				i.e. ``flp'' would allow f, l, and p
327				default is to allow all formats
328gf	D	str	NULL	graph data filter (plot (3X) format)
329generate_banner	D	bool	false
330				generate a banner when forwarding job
331group	D	str	daemon	LPD server group id for execution 
332hl	D	bool	false	print banner after job instead of before
333if	D	str	NULL	filter command, run on a per-file basis
334ignore_requested_user_priority	D	bool	false
335				Ignore the requested user priority when ordering jobs.
336				Prevents students... um... users from queue jumping.
337ipv6	A	bool	false	Use IPV6
338keepalive	A	bool	true
339				set socket SO_KEEPALIVE option
340kerberos_keytab	D	str	/etc/lpd.keytab
341				Kerberos lpd server keytab file
342kerberos_life	D	str	NULL
343				Kerberos lpd server key lifetime
344kerberos_renew	D	str	NULL
345				Kerberos lpd server key renewal time
346kerberos_server_principle	D	str	NULL
347				Kerberos remote lpd server principle
348kerberos_service	D	str	lpr
349				Kerberos service used in principle requests
350la	D	bool	true	write local printer accounting (if af is set)
351ld	D	str	NULL	leader string printed on printer open (see INITIALIZATION)
352lf	D	str	``log''	error and debugging log file (LPD)
353lk	D	bool	false	lock the lp device to force arbitration
354lockfile	D	str	/var/spool/lpd/lpd
355				lpd lock file (used only in lpd.conf).
356                The lpd_port port value is appended
357                to the lockfile value to provide a unique lockfile
358                even when different versions of LPRng are running
359                on the same system.
360logger_destination	D	str	NULL
361				destination for logging information.  Format is
362				host%port
363logger_max_size	D	num	1024
364				logger file maximum size in K
365logger_path	D	str	NULL
366				logger file pathname
367logger_timeout	D	num	0
368				logger connection timeout.  0 is no timeout.
369longnumber	D	bool	false
370				use 6 digit job numbers
371lp	D	str	NULL	device name or pipe to send output to
372lpd_bounce	A	bool	FALSE
373				Forces lpd to filter jobs and then forward them
374				as a single file
375				(See Bounce Queues)
376lpd_force_poll	A	bool	FALSE
377				Forces lpd to periodically poll lpd queues.
378lpd_poll_time	A	num	600
379				Check queues for work at this interval; start queues
380				in groups of 'lpd_poll_servers_started' at intervals
381				of 'lpd_poll_start_interval' seconds
382lpd_poll_start_interval	A	num	10
383				Start 'lpd_poll_servers_started' queue servers at this
384				interval.
385lpd_poll_servers_started	A	num	10
386				Start 'lpd_poll_servers_started' queues at once
387lpd_port	D	str	printer
388                format is [ipaddr%]port.  If the ipaddr is present
389                then the lpd listening socket is bound to the specified
390                ip address and port only, otherwise it is bound to all
391                interfaces. If the port value is not a number then the
392				then the getservbyname() system call is used to get the
393				port number.
394lpd_printcap_path	D	str	(see source)
395				printcap path for lpd, used instead of printcap path
396				(configuration value only)
397lpr_bounce	R	bool	true
398				Forces lpr to filter jobs and then send them.
399				(See Bounce Queues)
400lpr_bsd	R	bool	false
401				when set, LPR -m will not take argument, but will use
402				$USER value for return mail address.
403mail_from	D	str	NULL
404				specifies the user part of email From: address
405mail_operator_on_error	D	str	NULL
406				send mail to this user when LPD encounters printing error.
407max_connect_interval	A	num	60
408				maximum time between connection attempts
409max_log_file_size	D	num	0
410				maximum log file size in K bytes (0 is unlimited)
411				spool queue log file truncated to min_log_file_size
412				when value is nonzero and limited exceeded.
413max_servers_active	D	num	0
414				maximum servers that LPD will allow to be active at one
415				time.  0 selects the system default,  which is usually
416				pretty small, perhaps 10. (configuration value only).
417max_status_line	D	num	79	maximum number of characters on an LPQ status line
418max_status_size	D	num	10	maximum size (Kbytes) of status file
419mc	R	num	1	maximum copies allowed
420min_log_file_size	D	num	0	minimum size (Kbytes) of log file
421min_status_size	D	num	2	minimum size (Kbytes) of status file
422minfree	D	str	0
423				minimum space (in K) for spool directory
424ml	R	num	32	minimum printable characters for printable check
425ms_time_resolution	D	bool	false
426				log time in milliseconds
427mx	R	num	0	maximum job size in K, 0 = unlimited
428nb	D	num	0	if non-zero, do a nonblocking open on lp device
429nf	D	str	NULL	DITROFF data filter
430network_connect_grace	A	num	0
431				time between attempts to send jobs to spooler
432				Useful when dealing with network printer using LPD
433				interface to allow a bit of time between jobs.
434nline_after_file	D	bool	false
435				put the N (filename) after the data file information
436				in the control file.  Use to handle systems that want
437				it that way.
438of	D	str	NULL	output filter, run once for all output
439				(used for banner printing, form feeds between files)
440of_filter_options	D	str	(see source code)
441				when bk flag clear, options for OF print filters
442oh	A	str	NULL	Specific printcap entry for host;
443				(printcap entry ignored unless IP address of host and
444				entry value match.  Entry is used first to do glob
445				style match against the host's fully qualified domain name,
446				and then interpreted as a general IP address)
447order_routine	D	bool	false
448				use a user provided routine to generate queue order
449				information.
450originate_port	A	str	512 1023
451				when originating a connection, use ports in this range.
452pass_env	A	str	PGPPASS,PGPPATH
453				if not the LPD server, sanitize and put these variables
454				in a filter environment variable list.
455perms_path	A	str	_LPD_PERMS_PATH_
456				location of perms file (used in lpd.conf)
457pl	D	num	66	page length (in lines)
458pr	D	str	``/bin/pr''	pr program for p format
459prefix_o_to_z	D	bool	false
460				prefix the control file O line to the control file
461				Z line.
462prefix_z	D	str	NULL
463				prefix the specified options to the control file
464				Z line.
465prefix_z_to_o	D	bool	false
466				prefix the control file Z line to the control file
467				O line.
468printcap_path	A	str	_PRINTCAP_PATH_
469				location of printcap file (only in lpd.conf)
470ps	A	str	''status''	printer status file name
471pw	D	num	132	page width (in characters)
472px	D	num	0	page width in pixels (horizontal)
473py	D	num	0	page length in pixels (vertical)
474qq	A	bool	false	LPR - puts in the queue name (Q entry)
475				in the job control file when spooled or transferred.
476				LPD - when receiving or transferring a job,
477				if the queue name (Q entry) in the job control
478				file is not present,  puts in the queue name.
479queue_control_file	D	str	control.%P
480				name of the queue control file
481queue_lock_file	D	str	%P
482				name of the queue lock file
483queue_status_file	D	str	status.%P
484				name of the queue status file
485queue_unspooler_file	D	str	unspooler.%P
486				name of the queue unspooler status file
487remote_support	A	str	NULL
488				if non-null, specifies allowed operations to remote queue.
489				R=lpr, M=lprm, Q=lpq, V = lpq -v, C=lpc.  For example,
490				remote_support=RM would only allow LPR and LPRM operations.
491remove_z	D	str	null
492				remove these options from the control file Z line
493report_server_as	A	str	NULL
494				use the str value as the name of the server when reporting
495				LPQ or LPC status.
496require_explicit_q	Require a queue to be specified, do not use default
497				queue from printcap.
498retry_econnrefused	A	bool	true
499				if set, retry a connection to a remote system when an
500				ECONNREFUSED error is returned.
501retry_nolink	D	bool	true
502				if LPD is sending a job or opening a device for
503				printing and the value is true, then the connection or
504				device open is repeated indefinately.
505return_short_status	D	str	NULL
506				Some legacy (non-LPRng) LPQ programs expect 'short' status
507				to be returned.  This option allows you to specify which hosts
508				will get it.  The value is a list of hosts and/or IPaddresses
509				and masks to which the LPD server will provide short status.
510				For example:  return_short_status=192.8.0.0/16 will make LPD
511				return short status to all requests from hosts in subnet
512				192.8.0.0.  (See short_status_length)
513reuse_addr	A	bool	false
514				if set, use SO_REUSEADDR on outgoing connection ports.
515				This reduces the problems with exhausting port numbers.
516				(usually only in lpd.conf)
517reverse_lpq_status	D	str	NULL
518				When a lpq status request arrives from one of the specified 
519				hosts or IP addresses,  then the LPQ status format is inverted.
520				For example, if  reverse_lpq_status=host*,127.0.0.0/8,
521				then when a LONG status request arrives from host1 or from
522				ip address 127.0.0.1,  the SHORT status will be returned.
523reverse_priority_order	D	bool	false
524				Make highest priority A, lowest Z
525rf	D	str	NULL	filter for printing FORTRAN style text files
526rg	A	str	NULL	(restrict to group members)
527				Restrict use of queue to users which are members of
528				specified groups.
529rm	A	str	NULL	remote-queue machine (hostname) (with rp)
530router	D	str	NULL	script that dynamically re-routes a job
531				(see README.routing)
532rp	A	str	NULL	remote-queue printer name (with rm)
533rw	D	bool	false	open the printer for reading and writing
534safe_chars	D	str	NULL
535				additional safe characters for control file contents
536save_on_error	D	bool	false
537				Save job when an error occurs to allow post-mortem
538				diagnostics or reprinting.  This should only be set on
539				print queues.  It is also a diagnostic aid.
540save_when_done	D	bool	false
541				Save job when done (printed, transferred) to allow
542				retry at a later time.  This should only be set on
543				print queues.  It is also a diagnostic aid.
544sb	D	bool	false	short banner (one line only)
545sd	A	str	NULL	spool directory (only ONE printer per directory!)
546send_block_format	A	bool	false
547				Use the LPRng extended 'block job' job transmission
548				method to send a job to a remote site.
549send_data_first	A	bool	false	send data files then control files
550				when sending a job to a remote host.
551send_failure_action	D	str	"remove"
552				Action on print or transmission failure after send_try
553				attempts; use the following codes:
554				'success' (JSUCC)  - treat as successful
555				'abort'   (JABORT) - abort printer
556				'retry'   (JRETRY) - retry job
557				'remove'  (JREMOVE)- remove job
558				'hold'    (JHOLD)  - hold job
559				If the value is "|/filter", the filter will be run and
560				the number of attempts can be read from standard input.
561				The filter should exit with one of the error codes listed
562				above to cause the appropriate action.
563send_job_rw_timeout	A	num	6000
564				timeout on read/write operations when sending job to
565				printer or remote host (0 value is no timeout)
566send_query_rw_timeout	A	num	6000
567				timeout on read/write operations when performin a status
568				operation (0 value is no timeout)
569send_try	A	num	3
570				number of times to try sending
571				or printing a job. 0 is infinite.
572sendmail	D	str	/usr/sbin/sendmail -oi -t
573				sendmail command to send mail to user.  Flags must be set
574				so that address and other information is taken from
575				standard input.
576server	A	bool	false	printcap entry for server only
577server_auth_command	A	str	NULL
578				authentication command for server program
579server_tmp_dir	D	str	/tmp
580				temporary directory for server to create files when there
581				is no spool directory.
582server_user	D	str	daemon	server user name used in authentication operations
583sf	D	bool	true	suppress form feed separators between job files
584sh	D	bool	false	suppress headers and/or banner page
585shell	D	str	/bin/sh
586				SHELL enviornment variable value for filters
587short_status_length	D	num	1
588				If the return_short_status value is used and has a match against
589				a requesting address, this amount of status is set by the
590				short_status_length option.  For most legacy systems a 1 is
591				suitable (1 line of status).
592socket_linger	A	num	10
593				if nonzero, forces a SO_LINGER operation to be done
594				on all TCP/IP connections.  This usually corrects a problem
595				with missing last data transmissions to remote hosts.
596spool_dir_perms	D	num	042700	permissions for spool directory
597spool_file_perms	D	num	0600	permissions for spool file
598ss	D	str	NULL	name of queue that server serves (with sv)
599ssl_XXX	D	str	NULL
600				SSL authentication and encryption options.
601				See lprng_certs(1) for details.
602ssl_ca_file	str	A	_SSL_CA_FILE_
603				SSL signing certificate file
604ssl_ca_path	str	A	NULL
605				SSL signing certificate directory. Default is
606				directory containing ssl_ca_file.
607ssl_server_cert	str	A	_SSL_SERVER_CERT_
608				SSL server certificate
609ssl_server_password	str	A	_SSL_SERVER_PASSWORD_
610				SSL server certificate password
611stalled_time	D	num	120
612				Time after which to report an active job as stalled
613stop_on_abort	D	bool	true
614				Stop processing queue when print filter aborts.
615stty	D	str	NULL	stty settings for serial connected printer
616suspend_of_filter	D	bool	true
617				suspend OF filter and restart.  If false, close filter
618				and start new one for each activity.
619sv	D	str	NULL	names of servers for queue (with ss)
620syslog_device	D	str	/dev/console
621					name of syslog device to use if no syslog facility
622tc	A	str	NULL	reference to a printcap entry to include as part of
623				the current entry.
624tf	D	str	NULL	troff data filter (C/A/T phototypesetter)
625tr	D	str	NULL	trailer string to print when queue empties
626translate_format	D	str	NULL
627				translate job format (similar to tr(1) utility)
628				on outgoing jobs.
629				Example: translate_format=pfml
630				p format changed to f, m format to l
631translate_incoming_format	D	str	NULL
632				translate job format (similar to tr(1) utility)
633				on incoming jobs.  See translate_format.
634use_date	A	bool	true add date line ('D') to control file
635use_identifier	R	bool	true
636				add job identifier lines ('A') in the control file
637use_info_cache	D	bool	true	cache printcap information
638use_shorthost	R	bool	false
639				use only the hostname for job control
640				and data file names.  Host information in job file
641				will still be fully qualified domain name.
642user	D	str	daemon	LPD effective user (EUID) for SUID operations
643wait_for_eof	D	bool	true
644				wait for EOF on input when readable IO device,
645				do not close immediately at job end.
646vf	D	str	NULL	(Versatek) raster image filter
647.fi
648.SH "ENTRIES BY FUNCTION"
649.LP
650See the alphabetical listing for detailed information.
651.sp
652.nf
653.ta \w'\0\0\0\0'u +\w'\0\0\0\0'u +\w'Type 'u +\w'Default     'u +4n +4n +4n 8i
654.sp
655.B "Filters and Page Formats"
656Xf	D	str	NULL	output filter for format X (used by lpd)
657				'filter' sets default filter
658cf	D	str	NULL	cifplot data filter
659control_filter	D	str	NULL
660				Filter for control file. Used when sending job to remote
661				spool queue.
662df	D	str	NULL	tex data filter (DVI format)
663direct_read	D	bool	false
664				if true, filters are given direct access to file.
665				This means no progress indication possible.
666fx	A	str	NULL	valid output filter formats
667				i.e. ``flp'' would allow f, l, and p
668				default is to allow all formats
669gf	D	str	NULL	graph data filter (plot (3X) format)
670if	D	str	NULL	filter command, run on a per-file basis
671lpd_bounce	R	bool	false
672				Forces lpd to filter jobs and then forward them.
673				(See Bounce Queues)
674lpr_bounce	R	bool	false
675				Forces lpr to filter jobs and then send them.
676				(See Bounce Queues)
677nf	D	str	NULL	DITROFF data filter
678of	D	str	NULL	output filter, run once for all output
679pl	D	num	66	page length (in lines)
680pr	D	str	``/bin/pr''	pr program for p format
681pw	D	num	132	page width (in characters)
682px	D	num	0	page width in pixels (horizontal)
683py	D	num	0	page length in pixels (vertical)
684rf	D	str	NULL	filter for printing FORTRAN style text files
685translate_format	D	str	NULL
686				translate job format (similar to tr(1) utility)
687				only valid when transferring to remote spool queue.
688				Example: translate_format=pfml
689				p format changed to f, m format to l
690tf	D	str	NULL	troff data filter (C/A/T phototypesetter)
691vf	D	str	NULL	(Versatek) raster image filter
692
693.B Banners
694ab	D	bool	false	always print banner, ignore lpr -h option
695be	D	str		banner printing program for end (overrides bp, hl)
696bp	D	str		banner printing program (use hl to print banner at end)
697bs	D	str		banner printing program for start (overrides bp, hl)
698hl	D	bool	false	print banner after job instead of before
699sb	D	bool	false	short banner (one line only)
700sh	D	bool	false	suppress headers and/or banner page, overrides ab
701
702.B Accounting
703ae	D	str		accounting format for end of job or a program to run
704                to record accounting information (see also af, la, ar
705				and Accounting).
706af	D	str	NULL	name of accounting file (see also la, ar)
707ar	D	bool	true	write remote transfer accounting (if af, and as/ae set)
708as	D	str		accounting format for start of job or a program to run
709                to record accounting information (see also af, la, ar
710				and Accounting).
711la	D	bool	true	write local printer accounting (if af is set)
712
713.B "Queue control"
714ah	D	bool	false	auto-hold - job held until explicitly released
715bk	R	bool	false	backwards-compatible: be strictly RFC-compliant
716bkf	R	bool	false	backwards-compatible filter: use Berkeley filter options
717bqfilter	D	bool	false	if a bounce queue (sends jobs to remote site)
718				then when bqfilter true and a format filter is specified,
719				sends data files through format filter before transfer.
720				See also 'qq'.
721cd	D	str	NULL	control information directory for LPD server
722cm	A	str	NULL	comment identifying printer (LPQ)
723fd	D	bool	false	if true, no forwarded jobs accepted
724lf	D	str	``log''	error and debugging log file (LPD)
725longnumber	D	bool	false
726				use 6 digit job numbers
727mc	R	num	1	maximum copies allowed
728ml	R	num	32	minimum printable characters for printable check
729minfree	D	str	0	minimum space (Kb) to be left in spool filesystem
730				You can also use nnnM for nnn megabytes.
731mx	R	num	0	maximum job size (1Kb blocks, 0 = unlimited)
732ps	A	str	''status''	printer status file name
733nw	A	bool	false	spool dir is on an NFS file system
734				(take precautions when reading/writing files)
735qq	A	bool	false	place queue information in control file. See
736				alphabetical for details.
737rm	A	str	NULL	remote-queue machine (hostname) (with rp)
738rp	A	str	NULL	remote-queue printer name (with rm)
739sd	A	str	NULL	spool directory (only ONE printer per directory!)
740ss	D	str	NULL	name of queue that server serves (with sv)
741sv	D	str	NULL	names of servers for queue (with ss)
742sc	R	bool	false	suppress multiple copies
743use_auth	A	str	NULL authentication to use
744use_date	A	bool	true add date line ('D') to control file
745use_identifier	R	bool	true
746				add job identifier lines ('A') in the control file
747use_shorthost	R	bool	false	use only the hostname for job control
748				and data file names.  Host information in job file
749				will still be fully qualified domain name.
750
751.B "Connection and Interface to Printer"
752db	A	num	0	debug level when using this printer
753connect_interval	A	num	10
754				time between open or connection attempts
755connect_timeout	A	num	10
756				timeout value for connection or open
757				(0 is infinite number)
758ff	D	str	``\ef''	string to send for a form feed (see INITIALIZATION)
759fo	D	bool	false	print a form feed when device is opened
760fq	D	bool	false	print a form feed when device is closed
761ld	D	str	NULL	leader string printed on printer open (see INITIALIZATION)
762
763lp	D	str	NULL	device name or pipe to send output to
764lk	D	bool	false	lock the lp device to force arbitration
765max_connect_interval	A	num	60
766				maximum time between connection attempts
767nb	D	num	0	if non-zero, do a nonblocking open on lp device
768retry_econnrefused	A	bool	true
769				if set, retry a connection to a remote system when an
770				ECONNREFUSED error is returned.
771retry_nolink	D	bool	true
772				if LPD is sending a job or opening a device for
773				printing and the value is true, then the connection or
774				device open is repeated indefinately.
775rs	D	num	300	number of seconds between spool queue status scans
776rt	D	num	3	number of times to try printing (0=infinite).
777rw	D	bool	false	open the printer for reading and writing
778save_on_error	D	bool	false
779				See above.
780save_when_done	D	bool	false
781				See above.
782send_failure_action	D	str	remove
783				See above.
784send_try		alias for rt
785sf	D	bool	true	suppress form feed separators between job files
786socket_linger	A	num	10
787				if nonzero, forces a SO_LINGER operation to be done
788				on all TCP/IP connections.  This usually corrects a problem
789				with missing last data transmissions to remote hosts.
790tr	D	str	NULL	trailer string to print when queue empties
791
792.B "Serial Line Setup"
793br	D	num	none	if lp is a tty, set the baud rate (see ty)
794stty	D	str	NULL	stty commands to set output line characteristics
795				alias is sy, ms
796xs	D	num	0	like `xc' but set bits (see STTY)
797
798.B Miscellaneous
799.nf
800all	A	str	NULL	a list of all printers; (see ALL PRINTERS)
801destinations	D	str	NULL
802				names of printers that lpq/lprm should talk to find
803				a job that has been processed by a router script
804				(see README.routing)
805forward_auth	D	str	NULL
806				server to server authentication type, e.g. pgp, kerberos
807force_localhost	A	bool	TRUE
808				Forces the clients programs (lpr, lpc, etc.)
809				to send all print jobs and requests to the server running
810				on the localhost entry for action.  This flag effectively
811				forces BSD LPR behaviour.
812force_queuename	A	str	NULL
813				See above.
814logger_destination	D	str	NULL
815				destination for logging information.  Format is
816				host[%port][,(TCP|UDP)]
817oh	D	str	NULL	Specific printcap entry for host. See above.
818remote_support	A	str	RMQC
819				if non-null, specifies allowed operations to remote queue.
820				R=lpr, M=lprm, Q=lpq, C=lpc
821router	D	str	NULL	script that dynamically re-routes a job
822				(see README.routing)
823server	A	bool	false	printcap entry for server only
824server_auth_command	D	str	NULL
825				authentication command for server to use.
826tc	A	str	NULL	reference to a printcap entry to include as part of
827				the current entry.
828use_auth	D	str	NULL
829				client to server authentication type, e.g. pgp, kerberos
830user_auth_command	R	str	NULL
831				authentication command for user (client program)
832
833.nf
834.SH "FILTERS"
835.PP
836By convention,
837all output filter names have the form
838.B Xf,
839where
840.B X
841is the lower case letter corresponding to the lpr formatting option.
842The
843.B filter
844option can specify a default filter for job files.
845.PP
846The
847.B of
848filter is started for each job and is used to print the
849banner page and any FF separators between individual files of the job.
850It is sent a special stop sequence by the lpd server,
851and must suspend operations until sent a
852SIGCONT signal.
853A file or job filter
854is run separately for each file;
855at the end of the job the 
856.B of
857filter is restarted and used to print the trailing banner (if any)
858and FF separators.
859.LP
860Filters are invoked with a standard set of options defined by the
861bk_filter_options (backwards compatible),
862bk_of_filter_options (backwards compatible OF filter),
863and
864filter_options configuration variables.
865See the
866lpd(8)
867manual page for details.
868If the first characters of the filter specification are -$,
869i.e.- Xf=-$ filter,
870then the command line options are not added.
871Currently,
872the options are:
873.nf
874bk_filter_options $P $w $l $x $y $F $c $L $i $J $C $0n $0h $-a
875bk_of_filter_options $w $l $x $y
876filter_options $C $F $H $J $L $P $Q $R $Z $a $c $d \e
877    $e $f $h $i $j $k $l $n $s $w $x $y $-a
878.fi
879.SH "SPOOL QUEUES"
880.LP
881Printcap entries which have a spool directory value
882(sd) are called spool queues.
883Jobs sent to a printer with a spool queue are place in the
884spool directory. 
885When checking the spool queue for jobs,
886the server will check to see if there is a printcap file in the
887directory with the name
888.BR printcap. host.
889If there is,
890the additional printcap information is processed and used by the
891server.
892.LP
893If the spool directory is NFS exported,
894then remote hosts can manipulate the spool entries directly;
895this can have catastrophic effects,
896especially in systems where the NFS implementation has defects.
897The printcap information is particularly vulnerable to exploitation,
898as well as symbolic links,
899jobs which cannot be removed,
900etc.
901.SH "LOCAL PRINTERS"
902.LP
903Local printers have an
904.B lp
905entry,
906which is the device that output should be sent
907to,
908usually a serial port tty.
909PLP supplements this by
910using the lp field to indicate a remote printer,
911or by allowing communication with the printer using a separate
912program, known as an
913.I lp-pipe,
914instead of a serial line.
915If the printcap
916.B lp
917entry contains a string of the form
918.B printer@host,
919jobs are forwarded to the specified remote printer on the host.
920If the printcap
921.B lp
922entry contains a string of the form
923.B | command args
924, the command
925.B command
926is run, with the arguments
927.B args .
928This can be used to communicate with printers connected to
929network terminal servers, some TCP/IP-capable
930printers, and just about anything you can hack up a
931communication program for. Read the PLP Manual for more
932details.
933.SH "STTY OPTIONS"
934.PP
935The
936.B stty
937printcap parameter recognises a set of
938.IR stty (1)
939options 
940that can be used to set serial line characteristics for the printer.
941However, due to the differences between implementations of UNIX,
942there are several sets of
943.B ty
944options supported. Invoke
945.IR lpd (8)
946with the ``-v'' command-line option to see which set your
947installation is using.
948.PP
949Systems using the
950.IR sgtty 
951tty manipulation interface may use the following
952.IR stty (1)
953options:
954.nf
955.PP
956.ta 16n +16n +16n +16n +16n +16n +16n +16n +16n
957bs0	bs1	[-]cbreak	cooked	cr0	
958cr1	cr2	cr3	[-]decctlq	[-]echo	
959[-]even	ff0	ff1	[-]lcase	[-]litout	
960nl0	nl1	nl2	nl3	[-]nl	
961[-]noflsh	new	[-]nohang	old	[-]odd	
962[-]raw	start	stop	tab0	tab1	
963tab2	[-]tabs	[-]tandem	tek	ti700	
964[-]tilde	tn300	tty33	tty37	vt05	
965[-]evenp	[-]oddp	[-]pass8
966.fi
967.PP
968Systems using
969.IR termio 
970may use the following options:
971.nf
972.PP
973[-]ignbrk	[-]brkint	[-]ignpar	[-]parmrk	[-]inpck
974[-]istrip	[-]inlcr	[-]igncr	[-]icrnl	[-]iuclc
975[-]ixon	[-]ixany	[-]ixoff	[-]decctlq	[-]tandem
976[-]imaxbel	[-]opost	[-]olcuc	[-]onlcr	[-]ocrnl
977[-]onocr	[-]onlret	[-]ofill	[-]ofdel	[-]cstopb
978[-]cread	[-]parenb	[-]parodd	[-]hupcl	[-]clocal
979[-]loblk	[-]parity	[-]evenp	[-]oddp	[-]stopb
980[-]hup	[-]crtscts	[-]isig	[-]noisig	[-]icanon
981[-]cbreak	[-]xcase	[-]echo	[-]echoe	[-]echok
982[-]crterase	[-]lfkc	[-]echonl	[-]noflsh	[-]tostop
983[-]echoctl	[-]ctlecho	[-]echoprt	[-]prterase	[-]echoke
984[-]crtkill	[-]lcase	[-]nl	[-]litout	[-]pass8
985[-]raw	[-]sane	[-]cooked	[-]nopost	fill
986nl0	nl1	cr0	cr1	cr2
987cr3	tab0	tab1	tab2	tab3
988bs0	bs1	vt0	vt1	ff0
989ff1	cs5	cs6	cs7	cs8
990nul-fill	del-fill	-tabs 
991.fi
992.PP
993And systems using
994.IR termios
995may use the following options:
996.nf
997.PP
998[-]ignbrk	[-]brkint	[-]ignpar	[-]parmrk	[-]inpck
999[-]istrip	[-]inlcr	[-]igncr	[-]icrnl	[-]iuclc
1000[-]ixon	[-]ixany	[-]ixoff	[-]imaxbel	[-]pass8
1001[-]opost	[-]olcuc	[-]onlcr	[-]ocrnl	[-]onocr
1002[-]onlret	[-]ofill	[-]ofdel	[-]tabs	nl0
1003nl1	cr0	cr1	cr2	cr3
1004tab0	tab1	tab2	tab3	bs0
1005bs1	vt0	vt1	ff0	ff1
1006cs5	cs6	cs7	cs8	[-]cstopb
1007[-]cread	[-]parenb	[-]parodd	[-]hupcl	[-]clocal
1008[-]crtscts	[-]evenp	[-]parity	[-]oddp	[-]pass8
1009[-]isig	[-]icanon	[-]xcase	[-]echo	[-]echoe
1010[-]echok	[-]echonl	[-]noflsh	[-]tostop	[-]iexten
1011[-]echoctl	[-]ctlecho	[-]echoprt	[-]prterase	[-]echoke
1012[-]crtkill	[-]flusho	[-]pendin
1013.fi
1014.PP
1015The
1016.B fc
1017,
1018.B fs
1019,
1020.B xc
1021, and
1022.B xs
1023printcap entries are obsolete,
1024and if present with non-zero values will abort print job processing.
1025.SH "INITIALIZATION"
1026.LP
1027Many printers require an initialization string to be sent to them
1028in order to configure their operation.
1029The leader (ld) and trailer (tr) strings are sent at the start and
1030end of job processing.
1031These strings are interpreted using the C language conventions for
1032character representation:
1033\ennn is replaced with a character with the value nnn,
1034\en with a new line,
1035\er with a carriage return,
1036and so forth.
1037.SH "ALL PRINTERS"
1038.LP
1039The LPRng software has the capability to use a remote database
1040for obtaining printcap and other information.
1041One of the difficulties arises when a list of all printers
1042available is needed.
1043By convention,
1044the special printer name
1045.B all
1046is reserved for this information;
1047the
1048.B all 
1049field is a list of printers separated by spaces or punctuation.
1050For example:
1051.sp
1052.nf
1053#all printers
1054all:all=lp1,lp2,lp3,lp4
1055.fi
1056.SH ACCOUNTING
1057.PP
1058Accounting in the LPRng package has evolved over time
1059to accommodate new requirements.
1060The general approach is to use either a simple
1061.B "log to file"
1062method in which the accounting information is written
1063to a log file or a more complex
1064.B "log to program"
1065method in which the accounting information is written
1066to a program.
1067The information and method and actions taken
1068are specified by the following entries:
1069.nf
1070:as  - start of job accounting
1071:ae  - end of job accounting
1072:af  - default job accounting
1073:achk - used accounting for authorization.
1074.fi
1075.PP
1076The value of the :as and :ae options are either
1077a string which is used as the accounting information
1078or a program which is executed to log or save the accounting
1079information.
1080If a program is executed then the value of the
1081:af entry is ignored and the program is run to record
1082the job accounting information.
1083For example:
1084.nf
1085# string for information logging
1086:as=jobend $H $n $P $k $b $t
1087:ae=jobstart $H $n $P $k $b $t
1088
1089:as=|/usr/local/libexec/logjobstart $H $n $P $k $b $t
1090:ae=|/usr/local/libexec/logjobend $H $n $P $k $b $t
1091.fi
1092.PP
1093If the
1094:as or :ae value is a string then the :af information
1095is used to record the accounting information:
1096.nf
1097af=|/path    - run program, :as or :ae written to
1098               program STDIN
1099af=host%port - tcp/ip connection to port on host, 
1100               :as or :ae written to connection
1101af=path      - treat path as a file pathname,
1102               if file exists append :as or :ae
1103               to file.
1104.PP
1105If the :achk flag is set then this is modified as follows.
1106If the :as entry specifies a program or :af entry specifies a 
1107program or remote host (i.e. - logging using program) then
1108after accounting information has been written to the
1109program or connection a response will be read from the program
1110STDOUT or the connection.
1111This reponse is expected to be an ASCII string.
1112If the line is blank or starts with ACCEPT then the job will be printed,
1113HOLD will hold the job,  REMOVE will remove the job,
1114and ABORT or a non-recognizable response will cause printing to be aborted.
1115.PP
1116If the output is written to a program then the exit status
1117of the program can be used as well. 
1118If the program exits with nonzero status then the
1119exit code controls the disposition:
1120JHOLD, JREMOVE, and JABORT will hold, remove,
1121or abort the job respectively.
1122If the exit status is 0, then
1123the filter's STDOUT will be read and processed as described above.
1124.SH "BOUNCE QUEUES AND PRINT FORMATS"
1125.PP
1126If the lp option value has the format
1127.B ":lp=pr@host"
1128or job forwarding is specified by
1129.B ":rp=pr:rm=host"
1130then the normal operation is simple to store and forward
1131the print jobs.
1132If filters are specified then the job files are first
1133filtered and then the output of the filters is sent to the destination.
1134For historical reasons, a spool queue that does filtering and
1135forwarding is called a
1136.IR "bounce queue" .
1137The 
1138.B bounce_queue_format
1139(default 'f')
1140specifies the output for the filtered files.
1141If this is not desireable the
1142.B translate_format
1143option can be used to specify a format.
1144The option has the form SdSdSdN,
1145where S is the original format and d is the final format.
1146If none of the formats match and there is an odd number of formats
1147then the last one is used.
1148For example,
1149.B pfmlf
1150would convert formats
1151p to f, m to l, and v to f.
1152.PP
1153The
1154\&:lpd_bounce
1155flag concatenate the output of the filters
1156and the result will be sent as a single job file to the destination.
1157This facility is useful when handling legacy print spooler
1158applications that do not understand the RFC1179 copy,
1159etc., options.
1160The first letter of the
1161.B bounce_queue_format
1162(default 'f')
1163is used as the output file format.
1164.PP
1165The
1166.B lpr_bounce
1167printcap flag can be used to cause LPR to do bounce queue filtering
1168in exactly the same manner as the server.
1169This should be used with caution
1170as missing filters on the client system can cause unexpected behaviour.
1171.SH "KERBEROS, PGP, AND OTHER AUTHENTICATION METHODS"
1172.PP
1173LPRng supports built in kerberos authentication.
1174To enable this, the
1175LPD protocol has been extended to provide a way to transfer authenticated
1176and/or encrypted jobs and commands.
1177The details are covered in the LPRng HOWTO documentation.
1178.PP
1179Also, SSL can be used.
1180See
1181.BR lprng_certs (1)
1182for details.
1183.SH FILES
1184.PP
1185The files used by LPRng are set by values in the
1186printer configuration file.
1187The following are a commonly used set of default values.
1188.nf
1189.ta \w'/var/spool/lpd/printcap.<hostname>           'u
1190_LPD_CONF_PATH_	LPRng configuration file
1191${HOME}/.printcap	user printer description file
1192_PRINTCAP_PATH_	printer description file
1193_LPD_PERMS_PATH_	permissions
1194_LOCKFILE_	lock file for queue control
1195/var/spool/lpd		spool directories
1196/var/spool/lpd/QUEUE/control	queue control
1197/var/spool/lpd/QUEUE/log	trace or debug log file
1198/var/spool/lpd/QUEUE/acct	accounting file
1199/var/spool/lpd/QUEUE/status	status file
1200.fi
1201.SH "SEE ALSO"
1202lpd.conf(5),
1203lpc(8),
1204lpd(8),
1205checkpc(8),
1206lpr(1),
1207lpq(1),
1208lprm(1),
1209lpd.perms(5),
1210pr(1), lprng_certs(1), lprng_index_certs(1).
1211.SH DIAGNOSTICS
1212.nf
1213Most of the diagnostics are self explanatory.
1214If you are puzzled over the exact cause of failure,
1215set the debugging level on (-D5) and run again.
1216The debugging information will 
1217help you to pinpoint the exact cause of failure.
1218.fi
1219.SH "HISTORY"
1220LPRng is a enhanced printer spooler system
1221with functionality similar to the Berkeley LPR software.
1222The LPRng mailing list is lprng@lprng.com;
1223subscribe by sending mail to lprng-request@lprng.com with
1224the word subscribe in the body.
1225The software is available from ftp://ftp.lprng.com/pub/LPRng.
1226.SH "AUTHOR"
1227Patrick Powell <papowell@lprng.com>.
1228