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

Revision 2303, 33.7 kB (checked in by jerome, 19 years ago)

Updated the FSF's address

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