root / pykota / trunk / conf / pykota.conf.sample @ 1968

Revision 1968, 28.7 kB (checked in by jalet, 19 years ago)

TLS is now supported with the LDAP backend

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# PyKota sample configuration file
2#
3# Copy this file into the /etc/pykota/ directory
4# under the name /etc/pykota/pykota.conf
5#
6# PyKota - Print Quotas for CUPS and LPRng
7#
8# (c) 2003-2004 Jerome Alet <alet@librelogiciel.com>
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22#
23# $Id$
24#
25
26[global]
27# Storage backend for quotas
28# only PGStorage (PostgreSQL) and LDAPStorage (OpenLDAP) are supported.
29# MySQL and BerkeleyDB are planned.
30
31# the 'postgresql' value is deprecated, use 'pgstorage' instead.
32storagebackend: pgstorage
33
34# Quota Storage Server hostname (and optional port)
35# e.g. db.example.com:5432
36storageserver: localhost
37
38#
39# name of the Quota Storage Database
40storagename: pykota
41
42#
43# Quota Storage normal user's name and password
44# These two fields contain a username and optional password
45# which may give readonly access to your print quota database.
46#
47# PLEASE ENSURE THAT THIS USER CAN'T WRITE TO YOUR PRINT QUOTA
48# DATABASE, OTHERWISE ANY USER WHO COULD READ THIS CONFIGURATION
49# FILE COULD CHANGE HIS PRINT QUOTA.
50#
51storageuser: pykotauser
52# storageuserpw: Comment out if unused, or set to Quota Storage user password
53
54# Should the database caching mechanism be enabled or not ?
55# If unset, caching is disabled. Possible values Y/N/YES/NO
56# caching mechanism works with both PostgreSQL and OpenLDAP backends
57# but may be really interesting only with OpenLDAP.
58#
59# ACTIVATING CACHE MAY CAUSE PRECISION PROBLEMS IN PRINT ACCOUNTING
60# IF AN USER PRINTS ON SEVERAL PRINTERS AT THE SAME TIME.
61# YOU MAY FIND IT INTERESTING ANYWAY, ESPECIALLY FOR LDAP.
62#
63# FYI, I ALWAYS SET IT TO YES !
64#
65storagecaching: No
66
67# Should full job history be disabled ?
68# If unset or set to No, full job history is kept in the database.
69# This will be useful in the future when the report generator
70# will be written.
71# Disabling the job history can be useful with heavily loaded
72# LDAP servers, to not make the LDAP tree grow out of control.
73# Disabling the job history with the PostgreSQL backend works too
74# but it's probably less useful than with LDAP.
75disablehistory: No
76
77# LDAP example, uncomment and adapt it to your own configuration :
78#storagebackend: ldapstorage
79#storageserver: ldap://ldap.librelogiciel.com:389
80#storagename: dc=librelogiciel,dc=com
81#storageuser: cn=notadmin,dc=librelogiciel,dc=com
82#storageuserpw: abc.123
83#
84# TLS support for LDAP
85#
86# ldaptls can be set to either Yes or No
87# the default value when not set is No, meaning that TLS won't be used.
88#ldaptls: No
89#
90# cacert points to the CA Certificate file to use for TLS.
91# Ensure that every user who can launch PyKota commands can read this file.
92# There's NO default value for this directive.
93#cacert /etc/pykota/mycertfile
94#
95#
96# Here we define some helpers to know where
97# to plug into an existing LDAP directory
98#userbase: ou=People,dc=librelogiciel,dc=com
99#userrdn: uid
100#balancebase: ou=People,dc=librelogiciel,dc=com
101#balancerdn: uid
102#groupbase: ou=Groups,dc=librelogiciel,dc=com
103#grouprdn: cn
104#printerbase: ou=Printers,ou=PyKota,dc=librelogiciel,dc=com
105#printerrdn: cn
106#userquotabase: ou=UQuotas,ou=PyKota,dc=librelogiciel,dc=com
107#groupquotabase: ou=GQuotas,ou=PyKota,dc=librelogiciel,dc=com
108#jobbase: ou=Jobs,ou=PyKota,dc=librelogiciel,dc=com
109#lastjobbase: ou=LastJobs,ou=PyKota,dc=librelogiciel,dc=com
110#
111# How to create new accounts and groups
112# authorized values are "below" and "attach(objectclass name [, fail|warn])"
113#
114# "below" creates the new accounts/groups as standalone entries
115# below the above defined 'userbase' ou
116#
117# attach(objectclass name [, action]) tries to find some existing user/group
118# using the above defined 'userrdn' or 'grouprdn' and 'userbase'
119# 'groupbase', and attach the PyKota specific entries to it.
120# if action is "warn" and no entry exists to attach to, a new
121# entry is created, and a message is logged.
122# if action is "fail" and no entry exists to attach to, program
123# logs an error message and aborts.
124# if action is not set, the default value is "fail".
125#
126# a possible value:  newuser: attach(posixAccount, warn)
127#newuser : below
128#newgroup : below
129#
130# LDAP attribute which stores the user's email address
131#usermail : mail
132
133#
134# Choose what attribute contains the list of group members
135# common values are : memberUid, uniqueMember, member
136#groupmembers: memberUid
137
138# Activate low-level LDAP cache yes/no
139# Nothing to do with "storagecaching" which is higher level
140# and database independant.
141# This saves some search queries and may help with heavily
142# loaded LDAP servers.
143# This is EXPERIMENTAL.
144#
145# BEWARE : SETTING THIS TO 'YES' CAUSES PROBLEMS FOR NOW
146# BETTER TO LET IT SET TO 'NO'
147# ldapcache: no
148
149# Where to log ?
150# supported values : stderr, system (system means syslog, but don't use 'syslog' here)
151# if the value is not set then the default SYSTEM applies.
152logger: system
153
154# Enable debugging ? Put YES or NO there.
155# From now on, YES is the default in this sample
156# configuration file, so that debugging is activated
157# when configuring PyKota. After all works, just
158# put NO instead to save some disk space in your
159# logs.
160# Actually only database queries are logged.
161debug : Yes
162
163# Mail server to use to warn users
164# If the value is not set then localhost is used.
165smtpserver: localhost
166
167# Crash messages' recipient : in addition to the log files
168# each software crash can be sent to the author of PyKota
169# or any other person of your choice. By default this
170# is disabled. The recipient pykotacrashed@librelogiciel.com
171# reaches PyKota's author.
172# The 'adminmail' (defined a bit below) is CCed.
173#
174# Privacy concerns : what is sent is only :
175#
176#        - a copy of the software's traceback
177#        - a copy of the software's command line arguments
178#        - a copy of the software's environment variables
179#
180# suggested value
181# crashrecipient: pykotacrashed@librelogiciel.com
182
183# Email domain
184# If the value is not set, and the mail attribute for the user
185# is not set in the PyKota storage, be it LDAP (see usermail directive
186# above) or PostgreSQL, then email messages are sent to
187# username@smtpserver
188#
189# If the value is set, then email messages are sent to
190# username@maildomain using the SMTP server defined above
191#
192# Set the appropriate value below, example.com set as per RFC2606.
193maildomain: example.com
194
195# Should we force usernames to be all lowercase when printing ?
196# Default is No.
197# This is a global option only.
198# Some people reported that WinXP sends mixed case usernames
199# setting 'utolower: Yes' solves the problem.
200# Of course you have to use lowercase only when adding
201# users with edpykota, because ALL database accesses are
202# still case sensitive.
203#
204# If utolower is Yes, the usernames received from the printing
205# system is converted to lowercase at the start of the cupspykota
206# backend or of the lprngpykota filter.
207#
208# If utolower is No, which is the default, strict case checking
209# is done, this means that users 'Jerome' and 'jerome' are
210# different. Printer and groups names are ALWAYS case sensitive.
211utolower: No
212
213# Should we split usernames on a specific separator when printing ?
214# Default is No, i.e. if the value is unset.
215# This is a global option only.
216# This option adds support for Samba's Winbind utility, which
217# prefixes usernames with domain name and separator character.
218# Of course if you set this then you have to use NO separator when
219# adding users with edpykota.
220#
221# If winbind_separator is set, the usernames received from the printing
222# system are split on the separator's value, and only the last part
223# (real username) is used.
224#
225# If winbind_separator is not set, which is the default, strict
226# username equality checking will be done (modulo the setting
227# of the 'utolower' directive), this means that users 'DOMAIN1/jerome',
228# 'Domain2/jerome' and 'jerome' are different.
229# winbind_separator: /
230
231# When creating users or groups accounts, should we reject users
232# or groups which are unknown from the system ?
233# The default if unset is NO. This means that by default, you
234# can create users or groups for which `getent passwd username`
235# or `getent group groupname` returns nothing.
236#
237# Allowed values : Yes | No
238# Default value : No
239#
240# reject_unknown: No
241
242# Do we want to hide jobs' title, filename and options for privacy
243# reasons ?
244# This may be required in some countries (Italy comes to mind).
245# Allowed values are YES and NO.
246# If unset, the default value is NO, meaning that jobs' title, filename
247# and options will be saved into the history.
248# This option can't be set on a per printer basis, only into the
249# [global] section.
250privacy : no
251
252# What is the accounting backend to use
253#
254# supported values :
255#
256#    - hardware : asks the printer for its lifetime page counter
257#                 via either SNMP, AppleTalk, or any external
258#                 command. This method is the recommended one
259#                 in PyKota since its beginning.
260#
261#                 In the lines below "%(printer)s" is automatically replaced
262#                 at run time with your printer's Fully Qualified Domain Name
263#                 for network printers, if PyKota can extract it from its
264#                 environment.
265#                 e.g. myprinter.example.com
266#
267#         Recommended values :
268#
269#             accounter: hardware(snmp)
270#
271#               Extracts the printer's internal page counter via SNMP.
272#
273#         Or :
274#
275#             accounter: hardware(pjl)
276#
277#               Extracts the printer's internal page counter via PJL queries over port tcp/9100.
278#
279#         Other Examples :
280#         
281#             accounter: hardware(/usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
282#         
283#         Another untested example, using npadmin :
284#         
285#             accounter: hardware(/usr/bin/npadmin --pagecount %(printer)s)
286#         
287#         Another example, for AppleTalk printers which works fine :
288#         (You may need the pap CUPS backend installed, and copy the
289#         pagecount.ps file from untested/netatalk into /etc or any
290#         appropriate location)
291#         
292#             accounter: hardware(/usr/share/pykota/papwaitprinter.sh "MyPrinter:LaserWriter@*" && /usr/bin/pap -p "MyPrinter:LaserWriter@*" /usr/share/pykota/pagecount.ps  2>/dev/null | /bin/grep -v status | /bin/grep -v Connect | /usr/bin/tail -1)
293#         
294#         An example for parallel printers like the HP Laserjet 5MP :
295#         
296#             accounter: hardware(/bin/cat /usr/share/pykota/pagecount.pjl >/dev/lp0 && /usr/bin/head -2 </dev/lp0 | /usr/bin/tail -1)
297#         
298#         This value can be set either globally or per printer or both.
299#         If both are defined, the printer option has priority.
300#         
301#         Some examples and comments provided by Bob Martel from csuohio.edu
302#         
303#         For several printers I could not get the page count using snmpget.  I
304#         resorted to snmpwalk:
305#         
306#             accounter: hardware(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public %(printer)s | grep mib-2.43.10.2.1.4.1.1 | cut -d " " -f4)
307#         
308#         The last example is still more ugly, some of the printers only provided
309#         their counters without names, but at least always on the same line:
310#         
311#             accounter: hardware(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public -Ov %(printer)s | grep Counter32 | tail -2 | head -1 | cut -d " " -f2)
312#         
313#         An example using netcat and a preformatted PJL job which you can find
314#         in the untested/pjl directory, which is sent to a JetDirect print
315#         server on port 9100 :
316#         
317#             accounter: hardware(/bin/nc -w 2 %(printer)s 9100 </usr/share/pykota/pagecount.pjl | /usr/bin/tail -2)
318#         
319#         An example using the contributed pagecount.pl script which does
320#         the same as above, but should work on more printers :
321#         
322#             accounter: hardware(LC_ALL=C /usr/share/pykota/pagecount.pl %(printer)s 9100)
323#         
324#         NB : the LC_ALL=C is used because sometimes Perl can correctly set locale and is verbose
325#              about it, causing PyKota to miss the correct answer.
326#
327#         WARNING : In any case, when using an hardware accounter, please test the command line outside
328#                   of PyKota before. This will save you some headaches in case it doesn't work as expected.
329#         
330#         The waitprinter.sh is there to wait until the printer is idle again.
331#         This should prevent a job to be sent to the printer while another one is
332#         not yet finished (not all pages are printed, but the complete job is in
333#         the printer)
334#         
335#   YOU ABSOLUTELY HAVE TO BE SURE YOU HAVE A SCRIPT WHICH WAITS FOR THE
336#   PRINTER BEING READY BEFORE ASKING FOR ITS INTERNAL PAGE COUNTER.
337#         
338#   PYKOTA INCLUDES SUCH SCRIPTS FOR SNMP AND APPLETALK PRINTERS, MORE TO COME
339#
340#   SOME OF THE ABOVE EXAMPLES DON'T USE SUCH A SCRIPT, YOU HAVE BEEN WARNED
341#
342#
343#   WITH THE SPECIAL MAGIC hardware(snmp) AND hardware(pjl) VALUES, PYKOTA
344#   TAKES CARE OF ALL THIS FOR YOU, SO PLEASE UNDERSTAND THAT IT IS PREFERABLE
345#   TO USE THESE TWO METHODS : THEY WORK FINE, REQUIRE LITTLE TO NO CPU,
346#   AND DO ALL THE HARD WORK AUTOMATICALLY. IF YOU REALLY NEED TO YOU CAN USE
347#   YOUR OWN EXTERNAL COMMANDS AS DESCRIBED ABOVE, JUST BE CAREFUL WITH THIS.
348#         
349#
350#    - software : delegates the job's size computation to any
351#                 external command of your choice.
352#
353#                 best choice for this is probably to set it
354#                 this way :
355#
356#                   accounter: software(/usr/bin/pkpgcounter)
357#
358#                 pkpgcounter is a command line tool which is
359#                 part of PyKota and which can handle both
360#                 DSC compliant or binary PostScript, PCL5, PCL6 (aka PCLXL)
361#                 and PDF documents. More file formats will be added
362#                 in the future, as time permits.
363#
364#                 while pkpgcounter is the recommended value
365#                 you can use whatever command you want provided
366#                 that your command accepts the job's data on its
367#                 standard input and prints the job's size in pages
368#                 as a single integer on its standard output.
369#
370# This value can be set either globally or on a per printer basis
371# If both are defined, the printer option has priority.
372#
373# accounter: hardware(/usr/share/pykota/waitprinter.sh %(printer)s && /usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
374# accounter: hardware(snmp)
375# accounter: hardware(pjl)
376accounter: software(/usr/bin/pkpgcounter)
377
378# What should we do if the accounter's subprocess doesn't return
379# a valid result (for example doesn't return an integer on its stdout)
380#
381# Valid values are : 'continue' and 'stop'. 'stop' is the default
382# if unset.
383#
384# 'continue' means try to process as usual, this may introduce
385# accounting errors and free jobs. This was the default behavior
386# until v1.20alpha5.
387#
388# 'stop' means fail and stop the print queue. If an accounter
389# error occurs, most of the time this is a misconfiguration, so
390# stopping the print queue is usually the better thing to do
391# until the admin has fixed the configuration.
392#
393# This value can be set either globally or on a per printer basis
394# If both are defined, the printer option has priority.
395#
396# NB : This directive shouldn't do much now because in case
397# of external accounter error, PyKota just loops.
398#
399# onaccountererror: continue
400onaccountererror: stop
401
402# Print Quota administrator
403# These values can be set either globally or per printer or both.
404# If both are defined, the printer option has priority.
405# If these values are not set, the default admin root
406# and the default adminmail root@localhost are used.
407admin: John Doe
408adminmail: root@localhost
409
410#
411# Who should we send an email to in case a quota is reached ?
412# possible values are : DevNull, User, Admin, Both, External(some command)
413# The Both value means that the User and the Admin will receive
414# an email message.
415# The DevNull value means no email message will be sent.
416# This value can be set either globally or per printer or both.
417# If both are defined, the printer option has priority.
418# If the value is not set, then the default BOTH applies.
419#
420#   Format of the external syntax :
421#
422#       mailto: external(/usr/bin/mycommand >/dev/null)
423#
424#   You can use :
425#
426#       '%(action)s'            will contain either WARN or DENY
427#       '%(username)s'          will contain the user's name
428#       '%(printername)s'       will contain the printer's name
429#       '%(email)s'             will contain the user's email address
430#       '%(message)s'           will contain the message if you want
431#                               to use it.
432#
433#   On your command line, to pass arguments to your command.
434#   Example :
435#
436#       mailto: external(/usr/bin/callpager %(username)s "Quota problem on %(printername)s" >/dev/null)
437#
438#   To automatically send a WinPopup message (this may only work with a PDC,
439#   here the same machine does Samba as PDC + CUPS) :
440#
441#       mailto: external(echo "%(message)s"  | /usr/bin/iconv --to-code utf-8 --from-code iso-8859-15 | /usr/bin/smbclient -M "%(username)s" 2>&1 >/dev/null)
442#
443#   NB : I use ISO-8859-15, but Windows expects UTF-8, so we pipe the message
444#        into iconv before sending it to the Windows user.
445#
446# or more simply :
447#
448#       mailto: external(/usr/share/pykota/mailandpopup.sh %(username)s %(printername)s "%(email)s" "%(message)s" 2>&1 >/dev/null)
449#
450#   NB : The mailandpopup.sh shell script is now included in PyKota
451#
452#   NB : in ANY case, don't forget to redirect your command's standard output
453#        somewhere (e.g. >/dev/null) so that there's no perturbation to the
454#        underlying layer (filter or backend)
455#
456mailto: both
457
458#
459# Grace delay in days
460# This value can be set either globally or per printer or both.
461# If both are defined, the printer option has priority.
462# If the value is not set then the default seven (7) days applies.
463gracedelay: 7
464
465#
466# Poor man's threshold
467# If account balance reaches below this amount,
468# a warning message is sent by email
469#
470# If unset, default poor man's threshold is 1.0.
471# This option can only appear in the global section
472poorman: 2.0
473
474# Poor man's warning message
475# The warning message that is sent if the "poorman" value is reached
476# Again this must appear in the global section
477poorwarn: Your Print Quota account balance is low.
478 Soon you'll not be allowed to print anymore.
479
480# Soft limit reached warning message
481# The warning message that is sent if the soft quota limit is reached
482# May appear either globally or on a per-printer basis
483softwarn: Your Print Quota Soft Limit is reached.
484 This means that you may still be allowed to print for some
485 time, but you must contact your administrator to purchase
486 more print quota.
487 
488# Hard limit reached error message
489# The error message that is sent if the hard quota limit is reached
490# May appear either globally or on a per-printer basis
491hardwarn: Your Print Quota Hard Limit is reached.
492 This means that you are not allowed to print anymore.
493 Please contact your administrator at root@localhost
494 as soon as possible to solve the problem.
495
496# one section per printer, or no other section at all if all options
497# are defined globally.
498# Each section's name must be the same as the printer's queue name as defined
499# in your printing system, be it CUPS or LPRng, between square brackets, for
500# example a print queue named 'hpmarketing' would appear in this file as
501# [hpmarketing]
502
503
504# Default policy to apply when either :
505#
506#       - Printer doesn't exist in PyKota's database
507#       - User doesn't exist in PyKota's database
508#       - User has no quota entry for this Printer in PyKota's database
509#
510# Value can be either allow or deny or external(some command here)
511#
512# This value can be set either globally or per printer or both.
513# If both are defined, the printer option has priority.
514# If the value is not set then the default policy DENY applies.
515# There's no policy wrt inexistant groups, they are ignored.
516#
517# external policy can be used to launch any external command of your choice,
518# for example to automatically add the user to the quota storage
519# if he is unknown. Example :
520#
521#   policy: external(/usr/bin/edpykota --add --printer %(printername)s --softlimit 50 --hardlimit 60 %(username)s >/dev/null)
522#
523# NB : If you want to limit users by their account balance value, it is preferable to
524# use the following policy to automate user account creation on first print :
525#
526#   policy: external(/usr/bin/autopykota --initbalance 25.0 >/dev/null)
527#
528#   This will automatically add the user if he doesn't already exist, and
529#   set his initial balance value to 25.0 (for example). If the user already
530#   exists then his balance value will not be modified.
531#   Please don't use autopykota if you want to limit your users by page
532#   quota, and in any case, carefully read autopykota's help or manpage
533#   and understand its goal before using it in your own configuration.
534#
535# Of course you can launch any command of your choice with this, e.g. :
536#
537#   policy: external(/usr/local/bin/myadminscript.sh %(username)s >/dev/null)
538
539# You can use :
540#
541#       '%(username)s'          will contain the user's name
542#       '%(printername)s'       will contain the printer's name
543#
544#   On your command line, to pass arguments to your command.
545#
546#   NB : Don't forget to redirect your command's standard output somewhere
547#        (e.g. >/dev/null) so that there's no perturbation to the underlying
548#        layer (filter or backend)
549#
550# If the printer, user, or user quota entry still doesn't exist after
551# external policy command was launched (the external command didn't add it),
552# or if an error occured during the execution of the external policy
553# command, then the job is rejected.
554#
555policy: deny
556
557# Pre and Post Hooks
558# These directives allow the easy plug-in of any command of your choice
559# at different phases of PyKota's execution.
560# Pre and Post Hooks can access some of PyKota's internal information
561# by reading environment variables as described below.
562# The actual phase of PyKota's execution is available in the
563# PYKOTAPHASE environment variable.
564# Pre and Post Hooks can be defined either globally, per printer,
565# or both. If both are defined, the printer specific hook has
566# priority.
567#
568# List of available environment variables :
569# NB : Most of these variables are also available during the execution
570# of external commands defined in the accounter and mailto
571# directives.
572#
573# PYKOTAMD5SUM : Contains an hexadecimal digest of the md5 sum of the job's datas
574# PYKOTAPHASE : BEFORE or AFTER the job is sent to the printer
575# PYKOTAACTION : ALLOW or DENY or WARN for current print job
576# PYKOTAUSERNAME : user's name
577# PYKOTAPRINTERNAME : printer's name
578# PYKOTAPGROUPS : list of printers groups the current printer is a member of
579# PYKOTAJOBID : job's id
580# PYKOTATITLE : job's title
581# PYKOTAFILENAME : job's filename
582# PYKOTACOPIES : number of copies
583# PYKOTAOPTIONS : job's options
584# PYKOTABALANCE : user's account balance
585# PYKOTALIFETIMEPAID : user's grand total paid
586# PYKOTALIMITBY : user print limiting factor, for example 'quota' or 'balance'
587# PYKOTAPAGECOUNTER : user's page counter on this printer
588# PYKOTALIFEPAGECOUNTER : user's life time page counter on this printer
589# PYKOTASOFTLIMIT : user's soft page limit on this printer
590# PYKOTAHARDLIMIT : user's hard page limit on this printer
591# PYKOTADATELIMIT : user's soft to hard limit date limit on this printer
592# PYKOTASTATUS : contains "CANCELLED" when SIGTERM was received by PyKota
593#                else is not set.
594# PYKOTAJOBSIZEBYTES : contains the job's size in bytes. Always available.
595# PYKOTAPRECOMPUTEDJOBSIZE : contains the precomputed job's size (with enforcement: strict)
596# PYKOTAPRECOMPUTEDJOBPRICE : contains the precomputed job's price (with enforcement: strict)
597# PYKOTAJOBORIGINATINGHOSTNAME : contains the client's hostname if
598#                                it is possible to retrieve it.
599# PYKOTAPRINTERHOSTNAME : the printer's hostname or IP address for network
600#                         printers, or "localhost" if not defined or not
601#                         meaningful.
602
603# PreHook : gets executed after being sure the user, printer and user quota
604# entry on the printer both exist in the PyKota database, and after
605# checking if the user is allowed to print or not, but just before
606# the job is sent to the printer (if allowed)
607# prehook has access to many environment variables :
608#
609# PYKOTAACTION contains either "ALLOW", "WARN" or "DENY" and
610# represents the action which is to be done wrt the print job.
611# PYKOTAPHASE contains 'BEFORE' during execution of prehook
612#
613# uncomment the line below to see what environment variables are available
614# prehook: /usr/bin/printenv >/tmp/before
615
616# PostHook : gets executed after the job has been added to the history.
617# posthook has access to all the environment variables defined above,
618# as well as two additionnal environment variables : PYKOTAJOBPRICE
619# and PYKOTAJOBSIZE.
620# PYKOTAPHASE contains 'AFTER' during execution of posthook.
621#
622# uncomment the line below to see what environment variables are available
623# posthook: /usr/bin/printenv >/tmp/after
624
625# AccountBanner : how should banner accounting be done ?
626#
627# NB : CUPS ONLY FOR NOW !
628#
629# If enabled, banner pages printed from StartingBanner and/or EndingBanner
630# (depending on the value) will be included in the accounting for the
631# print job
632#
633# If disabled, banner pages printed from StartingBanner and EndingBanner will
634# *not* be included in the accounting for the print job
635#
636# IMPORTANT : CUPS generated banners are ALWAYS accounted for, although you
637#             can refund them by using negative prices on printers.
638#
639# Allowed values : Starting | Ending | None | Both
640#
641#       - Starting : only the starting banner will be accounted for.
642#       - Ending : only the ending banner will be accounted for.
643#       - Both : both starting and ending banners will be accounted for.
644#       - None : banners will not be accounted for.
645#
646# Default value :
647# accountbanner: Both
648
649# StartingBanner : if defined will print a banner before the rest of the job
650# is printed. The argument can be a printable file, or an executable file.
651# If not executable, the file will be printed as is. If executable, the
652# file will be executed and its output will be printed.
653#
654# NB : CUPS ONLY FOR NOW !
655#
656# In any case, the banner content which will be sent to the printer
657# MUST be in a format your printer will accept !!!
658#
659# The pkbanner command included in PyKota can automatically generate
660# starting and ending banners in the PostScript format. You can use
661# this command in a pipe through GhostScript if your printer doesn't
662# accept PostScript as an input format.
663# NB : pkbanner's default page size is A4
664#
665# startingbanner: /home/joe/mystaticbanner.ps
666# startingbanner: /usr/bin/pkbanner --pagesize=A4 --logo="/home/joe/mylogo.jpeg" --url="http://tech.example.com"
667# startingbanner: /usr/bin/pkbanner | gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sOutputFile=- -sDEVICE=lj5mono -
668# startingbanner: /usr/bin/pkbanner
669
670# EndingBanner : if defined will print a banner before the rest of the job
671# is printed. The argument can be a printable file, or an executable file.
672# If not executable, the file will be printed as is. If executable, the
673# file will be executed and its output will be printed.
674#
675# NB : CUPS ONLY FOR NOW !
676#
677# In any case, the banner content which will be sent to the printer
678# MUST be in a format your printer will accept !!!
679#
680# The pkbanner command included in PyKota can automatically generate
681# starting and ending banners in the PostScript format. You can use
682# this command in a pipe through GhostScript if your printer doesn't
683# accept PostScript as an input format.
684# NB : pkbanner's default page size is A4
685#
686# endingbanner: /home/joe/mystaticbanner.ps
687# endingbanner: /usr/bin/pkbanner --pagesize=A4 --logo="/home/joe/mylogo.jpeg" --url="http://tech.example.com"
688# endingbanner: /usr/bin/pkbanner | gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sOutputFile=- -sDEVICE=lj5mono -
689# endingbanner: /usr/bin/pkbanner
690
691# How should enforcement be done for this printer ?
692#
693# "laxist" is the default if value is not set, and allows users
694# to be over quota on their last job.
695#
696# "strict" tries to prevent users from ever being over quota.
697#
698# Enforcement can be defined either globally, per printer,
699# or both. If both are defined, the printer specific enforcement
700# setting has priority.
701#
702# valid values : "strict" or "laxist"
703#
704# default value
705# enforcement : laxist
706enforcement : strict
Note: See TracBrowser for help on using the browser.