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

Revision 1956, 28.4 kB (checked in by jalet, 19 years ago)

Added the reject_unknown directive to pykota.conf to reject user/group
creation if user or group is unknown to the system

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