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

Revision 2193, 32.1 kB (checked in by jerome, 20 years ago)

pkbanner now accepts more info to display on its command line

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