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

Revision 3273, 52.8 kB (checked in by matt, 16 years ago)

Use 127.0.0.1 and not localhost to fix MySQL's broken behavior.

  • 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
29#
30# (c) 2003, 2004, 2005, 2006, 2007 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 3 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, see <http://www.gnu.org/licenses/>.
43#
44# $Id$
45#
46
47
48#
49# All directives must be placed below the following line
50[global]
51
52
53
54####################################################################
55# SQLite3 : comment this section out if you use another backend    #
56####################################################################
57
58#storagebackend : sqlitestorage
59#storagename: /etc/pykota/pykota.db
60
61####################################################################
62
63
64
65############################################################################
66# PostgreSQL or MySQL: comment this section out if you use another backend #
67############################################################################
68storagebackend: pgstorage
69# storagebackend: mysqlstorage
70
71# Quota Storage Server hostname (and optional port)
72# e.g. db.example.com:5432 (for PostgreSQL) or db.example.com:3306 (for MySQL)
73# NB : leave the directive empty to use unix sockets (same host only)
74# NB : Using the word 'localhost' for MySQL defaults to a UNIX socket
75#      connection, which may be unexpected. Using 127.0.0.1 avoids this issue.
76#      See http://bugs.mysql.com/bug.php?id=31577 for more information.
77storageserver: 127.0.0.1
78
79#
80# name of the Quota Storage Database
81storagename: pykota
82
83#
84# Quota Storage normal user's name and password
85# These two fields contain a username and optional password
86# which may give readonly access to your print quota database.
87#
88# PLEASE ENSURE THAT THIS USER CAN'T WRITE TO YOUR PRINT QUOTA
89# DATABASE, OTHERWISE ANY USER WHO COULD READ THIS CONFIGURATION
90# FILE COULD CHANGE HIS PRINT QUOTA.
91#
92storageuser : pykotauser
93# In the line below change the password's value if needed.
94storageuserpw : readonlypw
95
96############################################################################
97
98
99
100####################################################################
101# LDAP : comment this section out if you use another backend       #
102####################################################################
103# LDAP example, uncomment and adapt it to your own configuration :
104#
105#storagebackend: ldapstorage
106#storageserver: ldap://ldap.example.com:389
107#storagename: dc=example,dc=com
108#
109# NB : the user and password below are the ones contained in
110# the sample LDIF file pykota/initscripts/ldap/pykota-sample.ldif
111# Please adapt these lines to your own needs.
112#
113#storageuser: cn=pykotauser,dc=example,dc=com
114#storageuserpw: ls88DT5j
115
116
117
118# TLS support for LDAP
119#
120# ldaptls can be set to either Yes or No
121# the default value when not set is No, meaning that TLS won't be used.
122#
123#ldaptls: No
124#
125# cacert points to the CA Certificate file to use for TLS.
126# Ensure that every user who can launch PyKota commands can read this file.
127# There's NO default value for this directive.
128#
129#cacert: /etc/pykota/mycertfile
130
131
132
133# Here we define some helpers to know where
134# to plug into an existing LDAP directory
135# NB : THE DIRECTIVES BELOW MUST BE PRESENT WITH AN LDAP BACKEND
136# BUT YOU ARE FREE TO CHANGE THE VALUES.
137#
138#userbase: ou=People,dc=example,dc=com
139#userrdn: uid
140#balancebase: ou=People,dc=example,dc=com
141#balancerdn: uid
142#groupbase: ou=Groups,dc=example,dc=com
143#grouprdn: cn
144#printerbase: ou=Printers,ou=PyKota,dc=example,dc=com
145#printerrdn: cn
146#jobbase: ou=Jobs,ou=PyKota,dc=example,dc=com
147#lastjobbase: ou=LastJobs,ou=PyKota,dc=example,dc=com
148#billingcodebase: ou=BillingCodes,ou=PyKota,dc=example,dc=com
149
150# These two fields are special, they either accept a branch
151# dn, like an ou for example, or the special keywords 'user'
152# and 'group'. If 'user' or 'group' is used, the print quota
153# entries will be created below the user or group entry itself,
154# which will then be used like a branch (you can mix and match
155# different values depending on what you want to do).
156#
157# NB : YOU MUST CHOOSE A VALUE FOR USERQUOTABASE AND A VALUE
158# FOR GROUPQUOTABASE, BUT ONLY ONE LINE OF EACH MUST BE PRESENT.
159#userquotabase: user
160#userquotabase: ou=UQuotas,ou=PyKota,dc=example,dc=com
161#groupquotabase: group
162#groupquotabase: ou=GQuotas,ou=PyKota,dc=example,dc=com
163
164
165
166# How to create new accounts and groups
167# authorized values are "below" and "attach(objectclass name [, fail|warn])"
168#
169# "below" creates the new accounts/groups as standalone entries
170# below the above defined 'userbase' ou
171#
172# attach(objectclass name [, action]) tries to find some existing user/group
173# using the above defined 'userrdn' or 'grouprdn' and 'userbase'
174# 'groupbase', and attach the PyKota specific entries to it.
175# if action is "warn" and no entry exists to attach to, a new
176# entry is created, and a message is logged.
177# if action is "fail" and no entry exists to attach to, program
178# logs an error message and aborts.
179# if action is not set, the default value is "fail".
180#
181# a possible value:  newuser: attach(posixAccount, warn)
182#
183#newuser : below
184#newgroup : below
185
186
187
188# LDAP attribute which stores the user's email address
189#
190#usermail : mail
191
192
193
194# Choose what attribute contains the list of group members
195# common values are : memberUid, uniqueMember, member
196#
197#groupmembers: memberUid
198
199
200
201# Activate low-level LDAP cache yes/no
202# Nothing to do with "storagecaching" which is higher level
203# and database independant.
204# This saves some search queries and may help with heavily
205# loaded LDAP servers.
206# This is EXPERIMENTAL.
207#
208# BEWARE : SETTING THIS TO 'YES' CAUSES PROBLEMS FOR NOW
209# BETTER TO LET IT SET TO 'NO'
210#
211# ldapcache: no
212
213####################################################################
214
215#############################################################
216# END of database specific directives                       #
217#############################################################
218
219
220
221# Should the database caching mechanism be enabled or not ?
222# If unset, caching is disabled. Possible values Y/N/YES/NO
223# caching mechanism works with both relationnal and OpenLDAP backends
224# but may be really interesting only with OpenLDAP.
225#
226# ACTIVATING CACHE MAY CAUSE PRECISION PROBLEMS IN PRINT ACCOUNTING
227# IF AN USER PRINTS ON SEVERAL PRINTERS AT THE SAME TIME.
228# YOU MAY FIND IT INTERESTING ANYWAY, ESPECIALLY FOR LDAP.
229#
230# THERE'S NO GUARANTEE THAT THIS CACHING MECHANISM WILL IMPROVE
231# PERFORMANCE WITH RELATIONNAL BACKENDS. IT MIGHT EVEN MAKE
232# PERFORMANCE DECREASE. AS ALWAYS : YMMV.
233#
234# FYI, I ALWAYS SET IT TO YES !
235#
236storagecaching: No
237
238
239
240# Should full job history be disabled ?
241# If unset or set to No, full job history is kept in the database.
242# Disabling the job history can be useful with heavily loaded
243# LDAP servers, to not make the LDAP tree grow out of control.
244# Disabling the job history with a relationnal backend works too
245# but it's probably less useful than with LDAP.
246#
247disablehistory: No
248
249
250
251# Where to log ?
252# supported values : stderr, system (system means syslog, but don't use
253# 'syslog' here). if the value is not set then the default SYSTEM applies.
254#
255logger: system
256
257
258
259# Enable debugging ? Put YES or NO there.
260# debug is set to YES in this sample configuration file, so debugging
261# is activated when configuring PyKota, which helps a lot. After all
262# works, just put NO instead to save some disk space in your logs.
263# NB : When set to YES, there is a very significant impact on performance
264# when managing many users, printers or billing codes at once, because
265# hundreds of thousands of log lines can be generated.
266# When printing a job, typically around 250-300 log lines are generated,
267# so the impact per job is really minimal. Note however that this will
268# add up over a large number of jobs.
269#
270debug : Yes
271
272
273
274# The URL to PyKota's logo when used from the CGI scripts.
275# You can use your own logo by modifying the URL below.
276# If not defined, the default URL is the same as the
277# one defined below :
278#
279logourl : http://www.pykota.com/pykota.png
280
281
282
283# The destination to which the web browser will be redirected
284# when you click on the logo defined above.
285# If not defined, the default URL is the same as the
286# one defined below :
287#
288logolink : http://www.pykota.com/
289
290
291
292# Mail server to use to warn users
293# If the value is not set then localhost is used.
294#
295smtpserver: localhost
296
297
298
299# Crash messages' recipient : in addition to the log files
300# each software crash can be sent to the author of PyKota
301# or any other person of your choice. By default this
302# is disabled for privacy concerns (see below). The address
303# pykotacrashed@librelogiciel.com reaches PyKota's author.
304# The 'adminmail' (defined a bit below) is CCed.
305#
306# Privacy concerns : what is sent is only :
307#
308#        - a copy of the software's traceback
309#        - a copy of the software's command line arguments
310#        - a copy of the software's environment variables
311#
312# suggested value :
313#
314# crashrecipient: pykotacrashed@librelogiciel.com
315
316
317
318# Email domain
319# If the value is not set, and the mail attribute for the user
320# is not set in the PyKota storage, be it LDAP (see usermail directive
321# above) or a relationnal one, then email messages are sent to
322# username@smtpserver
323#
324# If the value is set, then email messages are sent to
325# username@maildomain using the SMTP server defined above
326#
327# Set the appropriate value below, example.com set as per RFC2606.
328#
329maildomain: example.com
330
331
332
333# Should we modify usernames when printing ?
334# Default is native, meaning usernames won't be modified.
335# This is a [global] option only.
336# Some people reported that WinXP sends mixed case usernames,
337# setting usernamecase to 'upper' or 'lower' solves the problem.
338# Of course you have to use uppercase or lowercase only when managing
339# users with pkusers, because ALL database accesses are
340# still case sensitive.
341#
342# If usernamecase is 'upper' or 'lower', the usernames received
343# from the printing system are converted to uppercase or lowercase,
344# respectively, at the start of printing, BUT ONLY when printing.
345#
346# If usernamecase is 'native', which is the default, strict case checking
347# is done, this means that users 'Jerome' and 'jerome' are
348# different. Printer and groups names are ALWAYS case sensitive.
349#
350# usernamecase : upper
351# usernamecase : lower
352usernamecase: native
353
354
355
356# Should we split usernames on a specific separator when printing ?
357# Default is No, i.e. if the value is unset.
358# This is a [global] option only.
359# This option adds support for Samba's Winbind utility, which
360# prefixes usernames with domain name and separator character.
361# Of course if you set this then you have to use NO separator when
362# adding users with edpykota.
363#
364# If winbind_separator is set, the usernames received from the printing
365# system are split on the separator's value, and only the last part
366# (real username) is used.
367#
368# If winbind_separator is not set, which is the default, strict
369# username equality checking will be done (modulo the setting
370# of the 'usernamecase' directive), this means that users 'DOMAIN1/jerome',
371# 'Domain2/jerome' and 'jerome' are different.
372#
373# winbind_separator: /
374
375
376
377# When creating users or groups accounts, should we reject users
378# or groups which are unknown from the system ?
379# The default if unset is NO. This means that by default, you
380# can create users or groups for which `getent passwd username`
381# or `getent group groupname` returns nothing.
382#
383# Allowed values : Yes | No
384# Default value : No
385#
386# reject_unknown: No
387
388
389
390# Do we want to hide jobs' title, filename and options for privacy
391# reasons ?
392# This may be required in some countries (Italy comes to mind).
393# Allowed values are YES and NO.
394# If unset, the default value is NO, meaning that jobs' title, filename
395# and options will be saved into the history.
396# This option can't be set on a per printer basis, only into the
397# [global] section.
398#
399privacy : no
400
401
402
403# When the real CUPS backend fail, should we modify the
404# user's page counters and account balance or not ?
405# Also should we retry and if yes then how often and how many times ?
406# If you trust your users, set it to "nocharge".
407# If you think they found some mean to kill the real CUPS backend,
408# then set it to "charge".
409# If your print queues get regularly disabled by CUPS when the printers
410# are switched off, you might want to set it to "retry:N:S" where
411# N is the number of times the operation should be retried, and S is
412# the delay in seconds during which PyKota will sleep before trying again.
413# This 'retry' feature works in a way similar to Till Kamppeter's beh
414# backend wrapper which offers this functionnality but is actually not
415# compatible with PyKota (because of my own inability to master regular
416# expressions).
417# If N is 0, PyKota will retry indefinitely each S seconds until the
418# backend succeeds, so you should use this with caution. If N is 0,
419# of course neither "charge" nor "nocharge" will be honored.
420# You can combine "charge" or "nocharge" with "retry:N:S" if you want,
421# by separating the values with a comma as shown in the examples below.
422# If unset, the default value is "nocharge", meaning that users won't be
423# charged whenever a CUPS backend fails. This is the OPPOSITE
424# behavior compared to PyKota versions prior to 1.24alpha2.
425# This value can be set either globally or on a per printer basis
426# If both are defined, the printer option has priority.
427#
428# onbackenderror : charge,retry:5:60
429# onbackenderror : retry:0:300
430# onbackenderror : retry:3:300,nocharge
431# onbackenderror : charge
432onbackenderror : nocharge
433
434
435
436# Should we strip off some characters from the beginning of
437# print jobs' titles ? This can be used to remove smbprn.??????
438# which sometimes appear when printing in raw mode from Windows
439# through Samba.
440# This setting only applies at printing time.
441# When not set, titles are used as received from the printing system.
442# The default is to not strip any character off of jobs' titles.
443# This value can be set either globally or on a per printer basis
444# If both are defined, the printer option has priority.
445#
446# striptitle : smbprn.??????
447
448
449
450# Should we launch a command to overwrite the job's ticket ?
451# This allows a command to overwrite the username and/or the
452# billing code used, or to deny or cancel the job.
453# If unset no command is launched and the job's username and
454# billing code are used as they are received.
455# To overwrite the job's ticket, the command has to print
456# on its standard output one or more of the following lines,
457# without any prefix or space character :
458#
459#    USERNAME=the_username_we_want_to_overwrite_with
460#    BILLINGCODE=the_billingcode_we_want_to_overwrite_with
461#    REASON=reason_we_chose_deny_or_cancel
462#    AUTH=NO (equivalent to DENY below)
463#    DENY
464#    CANCEL
465#
466# NB : the output of your command is entirely read, and the latest
467# value seen is used, so you command can output several usernames
468# or billing codes and only the latest ones will be used.
469# If only USERNAME= lines are printed, the billing code,
470# if any, is used unchanged.
471# If only BILLINGCODE= lines are printed, the username is
472# used unchanged.
473# If DENY or CANCEL is output, neither the username nor the
474# billing code can be overwritten.
475# If REASON is output, that will be used in the notification in the case of
476# DENY or CANCEL. Otherwise, the built-in reasons will be used.
477#
478# This value can be set either globally or on a per printer basis
479# If both are defined, the printer option has priority.
480#
481#�IMPORTANT :
482#
483#       If you use this directive to interact with the end user in
484#       some way, for example through pknotify+pykoticon or similar
485#       tools, you have to keep in mind that this directive, as all
486#       the directives in pykota*.conf, is processed at the time
487#       the print job reaches the top of the print queue, and not
488#       at the time it enters the print queue. For heavily loaded
489#       systems where several jobs are in the print queue at a given
490#       time, there may be a significant delay between the moment the
491#       user submits the print job, and the moment this directive is
492#       processed.
493#
494# examples :
495#
496# overwrite_jobticket : /usr/bin/pknotify --destination $PYKOTAJOBORIGINATINGHOSTNAME:7654 --timeout 180 --denyafter 3 --checkauth --ask "Username:username:$PYKOTAUSERNAME" "Password:password:" "Billing code:billingcode:$PYKOTAJOBBILLING"
497# overwrite_jobticket : /path/to/some/script/or/command
498
499
500
501# Should we ask the end user for a confirmation about their print job ?
502#
503# Any script can be launched here. If your script prints CANCEL on
504# its standard output, the job is cancelled, else processing of the
505# job continues to next step.
506#
507# NB : the output of your command is read until CANCEL is found
508# or all lines have been read.
509#
510# This value can be set either globally or on a per printer basis
511# If both are defined, the printer option has priority.
512#
513# examples :
514#
515# askconfirmation : /usr/bin/pknotify --destination $PYKOTAJOBORIGINATINGHOSTNAME:7654 --timeout 120 --confirm "Hello $PYKOTAUSERNAME.\nPrint job $PYKOTAJOBID send to printer $PYKOTAPRINTERNAME is $PYKOTAPRECOMPUTEDJOBSIZE pages long\nand will cost you $PYKOTAPRECOMPUTEDJOBPRICE credits.\n\nYou currently have $PYKOTABALANCE credits.\n\nDo you really want to print ?"
516
517
518
519# What should we do when we print and the billing code used is
520# not present in the database ?
521# The default value is 'create' which adds the billing code to the
522# database.
523# Other values can be :
524#       deny
525#     which silently rejects the job.
526# or :
527#       deny(your script here)
528#     if you put the path to a script or command here, it is executed, for
529#     example you can open a popup window explaining why the job was
530#     rejected.
531#
532# This value can be set either globally or on a per printer basis
533# If both are defined, the printer option has priority.
534#
535# unknown_billingcode : deny
536# unknown_billingcode : deny(/usr/bin/pknotify --destination $PYKOTAJOBORIGINATINGHOSTNAME:7654 --timeout 60 --notify "The billing code specified is not allowed")
537# unknown_billingcode : deny(/path/to/some/script)
538# unknown_billingcode : create
539
540
541
542# Where should we store our (temporary) files when printing ?
543# if unset, defaults to a system directory dedicated to temporary
544# files and evaluated at runtime (see Python's documentation
545# for the tempfile.gettempdir() function).
546# This value can be set either globally or on a per printer basis
547# If both are defined, the printer option has priority.
548# On my system, when not set, the /var/spool/cups/tmp directory is used.
549# directory : /tmp
550# directory : /var/spool/cups
551
552
553
554# Should we keep our work files on disk after printing ?
555# If unset, temporary files are deleted once the work is finished.
556# If set to yes, files are kept on disk in the 'directory'
557# named with the previous directive.
558# This value can be set either globally or on a per printer basis
559# If both are defined, the printer option has priority.
560# Default value is No, meaning temporary files are deleted
561# You should set it to yes only during installation to not
562# waste disk space during normal use.
563#
564# keepfiles : yes
565keepfiles : no
566
567
568
569# What is the accounting backend to use : this defines the way PyKota
570# will compute the number of pages printed. This directive is the most
571# important one in PyKota's configuration.
572#
573# NB : This directive is MANDATORY, there's no default value when not set.
574#
575# Supported values :
576#
577# - software([/path/to/some/script[ --with-args]])
578# - hardware(snmp[:community]|pjl[:port]|/path/to/some/script[ --with-args])
579#
580# Hardware asks the printer for its lifetime page counter through either
581# SNMP, PJL-over-TCP, or through any command of your choice. This is
582# the recommended way to use PyKota, although it might not work with some
583# printers. The page counter is asked twice per job : before the job
584# is sent to the printer, and after it has been entirely sent.
585# The big advantages of hardware accounting are lighter CPU usage compared
586# to software accounting described below, although it can take more time
587# because of necessary internal counter stabilization delays, and the fact
588# that paper jams don't cause users to be charged for pages they couldn't
589# print.
590# For hardware accounting, two special values are accepted in addition
591# to a script name : snmp and pjl. 'snmp' asks PyKota to use its internal
592# SNMP code, 'pjl' asks PyKota to internally send a specially crafter PJL
593# job to the printer's TCP port 9100 (by default).
594#
595# Software counts pages by parsing the print job's datas, either internally
596# when no script is specified, or through any script of your choice.
597# This works with ALL printers, provided you've got a script to parse
598# datas produced by your printer driver. PyKota's internal parser, also
599# available under the name 'pkpgcounter', recognizes several page description
600# languages, but may occasionally fail for some printer drivers.
601# You can however use any other command, provided it can read the datas to
602# parse from its standard input, and prints a single integer on its standard
603# output, representing the number of pages in the print job.
604# Software accounting unfortunately may overcharge users in case of paper
605# jams.
606#
607# Ink computes the price of a print job by parsing the job's datas
608# through pkpgcounter, and using the percents of ink coverage returned
609# for each color in the specified colorspace.
610
611# Supported colorspaces for ink accounting currently are :
612#
613#       bw      ===> Black & White
614#       cmyk    ===> Cyan, Magenta, Yellow, Black
615#       cmy     ===> Cyan, Magenta, Yellow
616#       rgb     ===> Red, Green, Blue
617#       gc      ===> Grayscale, Colored : this is a pseudo colorspace useful
618#                    if all you need is differentiating grayscale from
619#                    colored pages.
620#
621# Supported resolutions for ink accounting are any number of dots
622# per inch comprised between 72 and 1200.
623# IMPORTANT : increasing the resolution increases precision, but
624# increase CPU load a lot at the same time. The default resolution
625# if unset is 72, for 72 dpi.
626# If you want to use ink accounting, you have to define a set of
627# coefficients for each color in the colorspace, as explained
628# further below in this file.
629#
630# You can get hints on which configuration is best for your printers by
631# typing : pkturnkey --doconf
632#
633# In the lines below "%(printer)s" is automatically replaced at run time
634# with your printer's Fully Qualified Domain Name for network printers,
635# if PyKota can extract it from its environment.
636#
637# Examples :
638#
639# accounter : hardware(snmp)
640# accounter : hardware(snmp:private)
641# accounter : hardware(pjl)
642# accounter : hardware(pjl:9101)
643# 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 " ")
644# accounter : hardware(/usr/bin/npadmin --pagecount %(printer)s)
645# 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)
646# accounter : hardware(/bin/cat /usr/share/pykota/pagecount.pjl >/dev/lp0 && /usr/bin/head -2 </dev/lp0 | /usr/bin/tail -1)
647# 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)
648# 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)
649# accounter : software(/usr/bin/pkpgcounter)
650# accounter : software()
651# accounter : ink(cmyk, 150)
652# accounter : ink(bw, 300)
653# accounter : ink(bw)
654# accounter : ink(cmy, 72)
655# accounter : ink(gc, 72)
656#         
657# This directive can be set either globally or per printer or both.
658# If both are defined, the printer option has priority.
659#         
660# IF YOU PLAN TO USE YOUR OWN SCRIPTS FOR HARDWARE ACCOUNTING,     
661# YOU ABSOLUTELY HAVE TO BE SURE YOU HAVE A SCRIPT WHICH WAITS FOR THE
662# PRINTER BEING READY BEFORE ASKING FOR ITS INTERNAL PAGE COUNTER.
663#         
664# PYKOTA'S 'snmp' and 'pjl' HARDWARE ACCOUNTING METHODS DO THE CORRECT WORK
665# INTERNALLY, BUT SOME OF THE EXAMPLES ABOVE DON'T, YOU HAVE BEEN WARNED.
666#
667# WITH THE SPECIAL MAGIC hardware(snmp) AND hardware(pjl) VALUES, PYKOTA
668# TAKES CARE OF ALL THIS FOR YOU, SO PLEASE UNDERSTAND THAT IT IS PREFERABLE
669# TO USE THESE TWO METHODS : THEY WORK FINE, REQUIRE LITTLE TO NO CPU,
670# AND DO ALL THE HARD WORK AUTOMATICALLY. IF YOU REALLY NEED TO YOU CAN USE
671# YOUR OWN EXTERNAL COMMANDS AS DESCRIBED ABOVE, JUST BE CAREFUL WITH THIS.
672#         
673# Sane default :
674#
675accounter: software()
676
677# Should we ensure that the printer really is idle before
678# sending the job's datas to it ?
679#
680# This directive is only used when you use an internal
681#�hardware accounting mechanism, like hardware(snmp) or
682# hardware(pjl), and is not used for external hardware
683# accounting mechanisms or for software or ink accounting.
684#
685# If PyKota and CUPS are properly configured, i.e. a single
686# computer (the print server) can access to a particular physical
687# printer, or all CUPS+PyKota print servers which access to the
688# same physical printer share a common network directory used
689# by PyKota to lock this printer resource, then it is not necessary
690# to really ensure the printer is idle before the job, because
691# this is already the case : we already wait at the end of the
692# preceding job for the printer to be idle before reading its
693# internal page counter. So setting this value to Yes usually
694# saves a lot of time between jobs, generally around 30 seconds.
695#
696# If you're not sure, leave this value to the default which is No,
697# meaning that before sending the job's datas to the printer, PyKota
698# will ensure this printer is in idle state.
699#
700# If not defined, a value of No is assumed.
701#
702# This value can be set either globally or on a per printer basis
703# If both are defined, the printer option has priority.
704#
705# Sane default :
706#
707skipinitialwait : no
708
709# What is the "pre"-accounter used for precomputing the job's size.
710#
711# Supported values are :
712#
713#  preaccounter: software()       
714#  preaccounter: software(/path/to/your/script)
715#  preaccounter: ink(colorspace, resolution)
716#
717# NB : the preaccounter directive doesn't support hardware() for obvious
718# reasons. If unset, "software()" is assumed. If you use your own script,
719# ensure that it only prints the job's number of pages (or an estimation
720# of it) on its standard output.
721#
722# You may want to define for example 'preaccounter : software(/bin/echo 1)'
723# in the case your printer supports an hardware accounter but pkpgcounter
724# can't parse your printer driver's datas.
725#
726# Supported colorspaces for ink accounting currently are :
727#
728#       bw      ===> Black & White
729#       cmyk    ===> Cyan, Magenta, Yellow, Black
730#       cmy     ===> Cyan, Magenta, Yellow
731#       rgb     ===> Red, Green, Blue
732#       gc      ===> Grayscale, Colored : this is a pseudo colorspace useful
733#                    if all you need is differentiating grayscale from
734#                    colored pages.
735#
736# Supported resolutions for ink accounting are any number of dots
737# per inch comprised between 72 and 1200.
738# IMPORTANT : increasing the resolution increases precision, but
739# increase CPU load a lot at the same time. The default resolution
740# if unset is 72, for 72 dpi.
741#
742# This value can be set either globally or on a per printer basis
743# If both are defined, the printer option has priority.
744#
745# Sane default :
746#
747preaccounter: software()
748
749
750
751# What should we do if the accounter's subprocess doesn't return
752# a valid result (for example doesn't return an integer on its stdout)
753#
754# Valid values are : 'continue' and 'stop'. 'stop' is the default
755# if unset.
756#
757# 'continue' means try to process as usual, this may introduce
758# accounting errors and free jobs. This was the default behavior
759# until v1.20alpha5.
760#
761# 'stop' means fail and stop the print queue. If an accounter
762# error occurs, most of the time this is a misconfiguration, so
763# stopping the print queue is usually the best thing to do
764# until the admin has fixed the configuration.
765#
766# This value can be set either globally or on a per printer basis
767# If both are defined, the printer option has priority.
768#
769# NB : This directive shouldn't do much now because in case
770# of external accounter error, PyKota just loops.
771#
772# onaccountererror: continue
773onaccountererror: stop
774
775
776
777# Print Quota administrator
778# These values can be set either globally or per printer or both.
779# If both are defined, the printer option has priority.
780# If these values are not set, the default admin root
781# and the default adminmail root@localhost are used.
782admin: John Doe
783adminmail: root@localhost
784
785
786
787# Who should we send an email to in case a quota is reached ?
788# possible values are : DevNull, User, Admin, Both, External(some command)
789# The Both value means that the User and the Admin will receive
790# an email message.
791# The DevNull value means no email message will be sent.
792# This value can be set either globally or per printer or both.
793# If both are defined, the printer option has priority.
794# If the value is not set, then the default BOTH applies.
795#
796#   Format of the external syntax :
797#
798#       mailto: external(/usr/bin/mycommand >/dev/null)
799#
800#   You can use :
801#
802#       '%(action)s'            will contain either WARN or DENY
803#       '%(username)s'          will contain the user's name
804#       '%(printername)s'       will contain the printer's name
805#       '%(email)s'             will contain the user's email address
806#       '%(message)s'           will contain the message if you want
807#                               to use it.
808#
809#   on your command line, to pass arguments to your command.
810#   Examples :
811#
812#     mailto: external(/usr/bin/callpager %(username)s "Quota problem on %(printername)s" >/dev/null)
813#
814#   To automatically send a WinPopup message (this may only work with a PDC,
815#   here the same machine does Samba as PDC + CUPS) :
816#
817#     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)
818#
819#   NB : I use ISO-8859-15, but Windows expects UTF-8, so we pipe the message
820#        into iconv before sending it to the Windows user.
821#
822# or more simply :
823#
824#     mailto: external(/usr/share/pykota/mailandpopup.sh %(username)s %(printername)s "%(email)s" "%(message)s" 2>&1 >/dev/null)
825#
826#   NB : The mailandpopup.sh shell script is now included in PyKota
827#
828#   NB : in ANY case, don't forget to redirect your command's standard output
829#        somewhere (e.g. >/dev/null) so that there's no perturbation to the
830#        underlying layer (filter or backend)
831#
832mailto : both
833
834
835
836# The value of the zero for account balance limitations.
837# If a user is limited by balance, he can print until
838# his balance reaches the value defined here. If unset,
839# the default value is 0. Any floating point value
840# is accepted.
841# You'll want to use this to give free credits to your users
842# at the start of the year for example.
843#
844# This option can only appear in the global section
845#
846# balancezero : -0.25
847#
848balancezero: 0.0
849
850
851
852# Grace delay in days
853# This value can be set either globally or per printer or both.
854# If both are defined, the printer option has priority.
855# If the value is not set then the default seven (7) days applies.
856#
857gracedelay : 7
858
859
860
861# Poor man's threshold
862# If account balance reaches below this amount, a warning message
863# is sent through the 'mailto' directive above.
864#
865# If unset, default poor man's threshold is 1.0.
866# This option can only appear in the global section
867#
868poorman : 1.0
869
870
871
872# Poor man's warning message
873# The warning message that is sent if the "poorman" value is reached
874# Again this must appear in the global section
875#
876poorwarn : Your Print Quota account balance is low.
877 Soon you'll not be allowed to print anymore.
878
879
880
881# Soft limit reached warning message
882# The warning message that is sent if the soft quota limit is reached
883# May appear either globally or on a per-printer basis
884#
885softwarn: Your Print Quota Soft Limit is reached.
886 This means that you may still be allowed to print for some
887 time, but you must contact your administrator to purchase
888 more print quota.
889
890
891
892# Hard limit reached error message
893# The error message that is sent if the hard quota limit is reached
894# May appear either globally or on a per-printer basis
895#
896hardwarn: Your Print Quota Hard Limit is reached.
897 This means that you are not allowed to print anymore.
898 Please contact your administrator at root@localhost
899 as soon as possible to solve the problem.
900
901
902
903# Default policy to apply when either :
904#
905#       - Printer doesn't exist in PyKota's database
906#       - User doesn't exist in PyKota's database
907#       - User has no quota entry for this Printer in PyKota's database
908#
909# Value can be either 'allow' or 'deny' or 'external(some command here)'
910#
911# 'Allow' means that the job will be printed even if the printer, the
912# user or this user's print quota entry on this printer doesn't exist
913# in PyKota's database. But the job won't appear in the printing history.
914#
915# 'Deny' means the job will be rejected if any of these three conditions
916# is met.
917#
918# 'External' means any command of your choice will be launched if any
919# of these three conditions is met. Once your command has ended, PyKota
920# will try again to retrieve the printer, user or user's print quota
921# entry from its database. If it fails to find any of them again, the
922# job will be rejected.
923#
924# This value can be set either globally or per printer or both.
925# If both are defined, the printer option has priority.
926# If the value is not set then the default policy DENY applies.
927# There's no policy wrt inexistant groups, they are ignored.
928#
929# external policy can be used to launch any external command of your choice,
930# for example to automatically add the user to the quota database, and set
931# page limits on the current printer if he is unknown :
932#
933#   policy: external(/usr/bin/pkusers --add --skipexisting %(username)s && /usr/bin/edpykota --add --skipexisting --printer %(printername)s --softlimit 50 --hardlimit 60 %(username)s)
934#
935# NB : If you want to limit users by their account balance value, it is preferable to
936# use the following policy to automate user account creation on first print :
937#
938#   policy: external(/usr/bin/autopykota --initbalance 25.0)
939#
940#   This will automatically add the user if he doesn't already exist, and
941#   set his initial balance value to 25.0 (for example). If the user already
942#   exists then his balance value will not be modified.
943#   Please don't use autopykota if you want to limit your users by page
944#   quota, and in any case, carefully read autopykota's help or manpage
945#   and understand its goal before using it in your own configuration.
946#
947# Of course you can launch any command of your choice with this, e.g. :
948#
949#   policy: external(/usr/local/bin/myadminscript.sh %(username)s)
950#
951# You can use :
952#
953#       '%(username)s'          will contain the user's name
954#       '%(printername)s'       will contain the printer's name
955#
956#   On your command line, to pass arguments to your command.
957#
958# If the printer, user, or user quota entry still doesn't exist after
959# external policy command was launched (the external command didn't add it),
960# or if an error occured during the execution of the external policy
961# command, then the job is rejected.
962#
963# By default, we reject all jobs from users not in the database :
964#
965policy: deny
966
967
968
969# Pre and Post Hooks
970# These directives allow the easy plug-in of any command of your choice
971# at different phases of PyKota's execution.
972# Pre and Post Hooks can access some of PyKota's internal information
973# by reading environment variables as described below.
974# The actual phase of PyKota's execution is available in the
975# PYKOTAPHASE environment variable.
976# Pre and Post Hooks can be defined either globally, per printer,
977# or both. If both are defined, the printer specific hook has
978# priority.
979#
980# List of available environment variables :
981# NB : Most of these variables are also available during the execution
982# of external commands defined in the accounter and mailto
983# directives.
984#
985# PYKOTADIRECTORY : The directory containing cupspykota's temporary files
986# PYKOTADATAFILE : The name of the temporary file which contains the
987#                  job's datas
988# PYKOTAFILENAME : The name of the file which contains the job's datas or
989#                  empty if datas come from stdin
990# PYKOTAMD5SUM : Contains an hexadecimal digest of the md5 sum of the job's datas
991# PYKOTAPHASE : BEFORE or AFTER the job is sent to the printer
992# PYKOTAACTION : ALLOW or DENY or WARN for current print job
993# PYKOTAUSERNAME : user's name, possibly modified through the overwrite_jobticket directive.
994# PYKOTAORIGINALUSERNAME : user's name, unmodified.
995# PYKOTAPRINTERNAME : printer's name
996# PYKOTAPGROUPS : list of printers groups the current printer is a member of
997# PYKOTAJOBID : job's id
998# PYKOTATITLE : job's title
999# PYKOTACOPIES : number of copies
1000# PYKOTAOPTIONS : job's options
1001# PYKOTABALANCE : user's account balance
1002# PYKOTALIFETIMEPAID : user's grand total paid
1003# PYKOTALIMITBY : user print limiting factor, for example 'quota' or 'balance'
1004# PYKOTAPAGECOUNTER : user's page counter on this printer
1005# PYKOTALIFEPAGECOUNTER : user's life time page counter on this printer
1006# PYKOTASOFTLIMIT : user's soft page limit on this printer
1007# PYKOTAHARDLIMIT : user's hard page limit on this printer
1008# PYKOTADATELIMIT : user's soft to hard limit date limit on this printer
1009# PYKOTASTATUS : contains "CANCELLED" when SIGTERM was received by PyKota
1010#                else is not set.
1011# PYKOTAJOBSIZEBYTES : contains the job's size in bytes. Always available.
1012# PYKOTAPRECOMPUTEDJOBSIZE : contains the precomputed job's size
1013# PYKOTAPRECOMPUTEDJOBPRICE : contains the precomputed job's price
1014# PYKOTAJOBORIGINATINGHOSTNAME : contains the client's hostname if
1015#                                it is possible to retrieve it.
1016# PYKOTAPRINTERHOSTNAME : the printer's hostname or IP address for network
1017#                         printers, or "localhost" if not defined or not
1018#                         meaningful.
1019# PYKOTAWARNCOUNT : the number of times the user was forbidden to print but a banner
1020#                   page was still printed on the current printer.                   
1021# PYKOTAOVERCHARGE : user's overcharging factor.
1022# PYKOTAJOBBILLING : Job's billing code if present, possibly modified through the overwrite_jobticket directive.
1023# PYKOTAORIGINALJOBBILLING : Job's billing code if present, unmodified.
1024# PYKOTAREASON : if the job was denied or a warning needs to be issued, contains
1025#                the message to send to the user.
1026# PYKOTAUSERDESCRIPTION : the user's textual description
1027# PYKOTAPRINTERDESCRIPTION : the printer's textual description
1028# PYKOTAPRINTERPASSTHROUGHMODE : the printer's passthrough mode
1029# PYKOTAPRINTERMAXJOBSIZE : the printer's maximal job size
1030# PYKOTAPRICEPERJOB : the printer's price per job
1031# PYKOTAPRICEPERPAGE : the printer's price per page
1032#
1033
1034
1035# PreHook : gets executed after being sure the user, printer and user quota
1036# entry on the printer both exist in the PyKota database, and after
1037# checking if the user is allowed to print or not, but just before
1038# the job is sent to the printer (if allowed)
1039# prehook has access to many environment variables :
1040#
1041# PYKOTAACTION contains either "ALLOW", "WARN" or "DENY" and
1042# represents the action which is to be done wrt the print job.
1043# PYKOTAPHASE contains 'BEFORE' during execution of prehook
1044#
1045# uncomment the line below to see what environment variables are available
1046# prehook: /usr/bin/printenv >/tmp/before
1047
1048
1049
1050# PostHook : gets executed after the job has been added to the history.
1051# posthook has access to all the environment variables defined above,
1052# as well as two additionnal environment variables : PYKOTAJOBPRICE
1053# and PYKOTAJOBSIZE.
1054# PYKOTAPHASE contains 'AFTER' during execution of posthook.
1055#
1056# uncomment the line below to see what environment variables are available
1057# posthook: /usr/bin/printenv >/tmp/after
1058
1059
1060
1061# AccountBanner : how should banner accounting be done ?
1062#
1063# If enabled, banner pages printed from StartingBanner and/or EndingBanner
1064# (depending on the value) will be included in the accounting for the
1065# print job
1066#
1067# If disabled, banner pages printed from StartingBanner and EndingBanner will
1068# *not* be included in the accounting for the print job
1069#
1070# IMPORTANT : CUPS generated banners are ALWAYS accounted for, although you
1071#             can refund them by using negative prices on printers.
1072#
1073# Allowed values : Starting | Ending | None | Both
1074#
1075#       - Starting : only the starting banner will be accounted for.
1076#       - Ending : only the ending banner will be accounted for.
1077#       - Both : both starting and ending banners will be accounted for.
1078#       - None : banners will not be accounted for.
1079#
1080# Default value :
1081# accountbanner: Both
1082
1083
1084
1085# Maximal number of times the banner will still be printed if
1086# the user is forbidden to print.
1087#
1088# This option can be set either globally or on a per printer basis.
1089# Allowed values are 0 or any positive integer.
1090# Default value is 0, which means that the banner won't be printed
1091# at all if the user is forbidden to print.
1092#
1093maxdenybanners: 0
1094
1095
1096
1097# If a job is cancelled, should any start or end banners still be printed
1098#
1099# This option can be set either globally or on a per printer basis.
1100# If set to yes, any defined banners will be printed
1101# If set to no, no banners will be printed
1102#
1103# This value defaults to yes
1104# printcancelledbanners: yes
1105
1106
1107# If a job is printed by the same person as the last job on the same printer,
1108# should banners be avoided to save some paper
1109#
1110# This option can be set either globally or on a per printer basis.
1111# If set to yes, any duplicate banners will be avoided forever
1112# If set to no or 0, no banners will be avoided (they will all be printed)
1113# If set to any positive integer, banners will be avoided if printed within
1114#     'integer' seconds of the last job
1115#
1116# This value defaults to no
1117# avoidduplicatebanners: yes
1118# avoidduplicatebanners: no
1119# avoidduplicatebanners: 600   
1120
1121
1122# StartingBanner : if defined will print a banner before the rest of the job
1123# is printed. The argument can be a printable file, or an executable file.
1124# If not executable, the file will be printed as is. If executable, the
1125# file will be executed and its standard output will be sent to the printer.
1126#
1127# In any case, the banner content which will be sent to the printer
1128# MUST be in a format your printer will accept !!!
1129#
1130# The pkbanner command included in PyKota can automatically generate
1131# starting and ending banners in the PostScript format. You can use
1132# this command in a pipe through GhostScript if your printer doesn't
1133# accept PostScript as an input format.
1134# NB : pkbanner's default page size is A4
1135#
1136# startingbanner: /home/joe/mystaticbanner.ps
1137# startingbanner: /usr/bin/pkbanner --pagesize=A4 --logo="/home/joe/mylogo.jpeg" --url="http://tech.example.com"
1138# startingbanner: /usr/bin/pkbanner | gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sOutputFile=- -sDEVICE=lj5mono -
1139# startingbanner: /usr/bin/pkbanner
1140
1141
1142
1143# EndingBanner : if defined will print a banner after the job
1144# has been printed. The argument can be a printable file, or an executable file.
1145# If not executable, the file will be printed as is. If executable, the
1146# file will be executed and its standard output will be sent to the printer.
1147#
1148# In any case, the banner content which will be sent to the printer
1149# MUST be in a format your printer will accept !!!
1150#
1151# The pkbanner command included in PyKota can automatically generate
1152# starting and ending banners in the PostScript format. You can use
1153# this command in a pipe through GhostScript if your printer doesn't
1154# accept PostScript as an input format.
1155# NB : pkbanner's default page size is A4
1156#
1157# A static banner page
1158# endingbanner: /home/joe/mystaticbanner.ps
1159#
1160# A banner with personnalized logo and url
1161# endingbanner: /usr/bin/pkbanner --pagesize=A4 --logo="/home/joe/mylogo.jpeg" --url="http://tech.example.com"
1162#
1163# A banner in the format accepted by the printer
1164# endingbanner: /usr/bin/pkbanner | gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sOutputFile=- -sDEVICE=lj5mono -
1165#
1166# A banner with more info on it, extracted from the yellow pages.
1167# the string "Phone 111222333444" will be added to the banner page
1168# if extractphone.sh returns 111222333444 for the current user.
1169# endingbanner: /usr/bin/pkbanner Phone `extractphone.sh $PYKOTAUSERNAME`
1170#
1171# Default PyKota banner
1172# endingbanner: /usr/bin/pkbanner
1173
1174
1175
1176# How should enforcement be done for this printer ?
1177#
1178# "laxist" is the default if value is not set, and allows users
1179# to be over quota on their last job.
1180#
1181# "strict" tries to prevent users from ever being over quota.
1182#
1183# Enforcement can be defined either globally, per printer,
1184# or both. If both are defined, the printer specific enforcement
1185# setting has priority.
1186#
1187# valid values : "strict" or "laxist"
1188#
1189# default value when not set is "laxist"
1190#
1191# enforcement : laxist
1192enforcement : strict
1193
1194
1195
1196# Should we trust the job size on this printer ?
1197#
1198# "trustjobsize : yes" is the default, the jobsize, either computed
1199# by the hardware or by software is trusted.
1200#
1201# "trustjobsize : >N:precomputed" : uses the precomputed value
1202#                                   if jobsize > N pages
1203# "trustjobsize : >N:25" : uses 25 if jobsize is >N pages
1204#
1205# General form : ">n:m" where n is a positive integer, and m is
1206# either the word 'precomputed' or a positive integer.
1207# The special form "yes" is also accepted and is the default.
1208#
1209# This directive can be set either globally or on a per printer
1210# basis. Use this directive when hardware accounting for a particular
1211# printer produces some glitches due to the printer returning
1212# incorrect answers.
1213#
1214# NB : DON'T MODIFY THIS IF YOU DON'T NEED TO. THIS IS ONLY TO BE USED
1215# AS A WORKAROUND FOR SOME PRINTERS. IT'S PROBABLY BETTER TO ALWAYS
1216# SET THIS DIRECTIVE TO 'yes'. THIS DIRECTIVE WILL ONLY BE HONORED
1217# IF PYKOTA DETECTS A DIFFERENCE BETWEEN THE PRECOMPUTED JOB SIZE
1218# AND THE JOB SIZE AS COMPUTED BY PYKOTA EITHER USING HARDWARE OR
1219# SOFTWARE.
1220#
1221trustjobsize : yes
1222
1223
1224
1225# Should we deny duplicate jobs ?
1226#
1227# A duplicate is a job sent twice (or more) in a row to the same printer
1228# by the same user.
1229#
1230# This can be defined either globally or on a per printer basis
1231# The default value is 'no', meaning that duplicate jobs are
1232# allowed.
1233#
1234# NB : if an user prints a job, a second user prints another
1235#      job, and the first user prints the first job again,
1236#      this is NOT considered as a duplicate since the two
1237#      identical jobs printed by the first user are not
1238#      one just after the other.
1239#
1240# Possible values are 'yes', 'no', or any other string.
1241# If the string is not recognized as a truth value,
1242# it is considered to be a command to launch.
1243# PyKota launches the command and parses its standard
1244# output. The special keywords 'ALLOW' and 'DENY' are
1245# recognized, allowing an external tool to decide if
1246# the job is to be allowed or denied.
1247#
1248# denyduplicates : /usr/bin/myowncommand with some arguments
1249# denyduplicates : yes
1250denyduplicates : no
1251
1252
1253
1254# Sets the delay in seconds after which two identical jobs are
1255# not considered as being a duplicate.
1256#
1257# This can be defined either globally or on a per printer basis
1258# The default value if not set is 0, for 0 seconds.
1259# duplicatesdelay : 300
1260duplicatesdelay : 0
1261
1262
1263
1264# Sets the maximum number of seconds to wait for the printer
1265# being in 'printing' mode once the job has been sent to it.
1266# Once this delay is expired, PyKota will consider this job
1267# will never be printed, aborts the hardware accounting
1268# process, and uses the latest internal page counter value seen.
1269#
1270# Increasing this value, or setting it to 0, may help with some
1271# printers which don't conform to RFC3805. Problem reported on a
1272# Samsung ML2551n gave a way for clever students to bypass
1273# hardware accounting entirely by removing the paper from
1274# the paper tray before the job had begun to print, then
1275# waiting 60 seconds, and putting the paper back in the tray...
1276#
1277# IMPORTANT : always ensure that your printers' firmware is up
1278# to date.
1279#
1280# This directive can be set either globally or on a per printer
1281# basis.
1282#
1283# When not set, an hardcoded value of 60 seconds is used.
1284# When set to 0, PyKota will wait indefinitely until the
1285# printer switches to the 'printing' status.
1286noprintingmaxdelay : 60
1287
1288
1289
1290# Defines the number of times the 'idle' printer status
1291# has to be reported before it being considered stable.
1292# Each check is done every 'statusstabilizationdelay' seconds
1293# as defined below.
1294#
1295# This directive can be set either globally or on a per printer
1296# basis.
1297#
1298# When not set, an hardcoded value of 5 times is used.
1299# The value must be a strictly positive integer.
1300statusstabilizationloops : 5
1301
1302
1303
1304# Defines the number of seconds to wait between two consecutive
1305# checks of the printer's status when using hardware accounting.
1306#
1307# Each check is done up to 'statusstabilizationloops' times.
1308#
1309# This directive can be set either globally or on a per printer
1310# basis.
1311#
1312# When not set, an hardcoded value of 4.0 seconds is used.
1313# The value must be a positive floating point value greater
1314# than or equal to 0.25 seconds.
1315statusstabilizationdelay : 4.0
1316
1317
1318
1319# Defines a (16 bits) bit mask to specify the set of error conditions
1320# reported through SNMP for which PyKota has to wait indefinitely
1321# until such an error is fixed before continuing with printing
1322# and/or accounting.
1323#
1324# This directive can be set either globally or on a per printer
1325# basis.
1326#
1327# The 16 bit values are specified as in RFC3805 (Printer MIB v2),
1328# as an ORed value of one or more of the following conditions :
1329#
1330#       1000 0000 0000 0000 : Low Paper
1331#       0100 0000 0000 0000 : No Paper
1332#       0010 0000 0000 0000 : Low Toner
1333#       0001 0000 0000 0000 : No Toner
1334#       0000 1000 0000 0000 : Door Open
1335#       0000 0100 0000 0000 : Jammed
1336#       0000 0010 0000 0000 : Offline
1337#       0000 0001 0000 0000 : Service Requested
1338#       0000 0000 1000 0000 : Input Tray Missing
1339#       0000 0000 0100 0000 : Output Tray Missing
1340#       0000 0000 0010 0000 : Marker Supply Missing
1341#       0000 0000 0001 0000 : Output Near Full
1342#       0000 0000 0000 1000 : Output Full
1343#       0000 0000 0000 0100 : Input Tray Empty
1344#       0000 0000 0000 0010 : Overdue Preventive Maintainance
1345#       0000 0000 0000 0001 : Not assigned
1346#
1347# When not set, an hardcoded value of hexadecimal 0x4FCC is used,
1348# which means that PyKota will wait indefinitely when using SNMP
1349# hardware accounting if one of the following conditions is met :
1350#
1351#   No Paper, Door Open, Jammed, Offline, Service Requested,
1352#   Input Tray Missing, Output Tray Missing, Output Full, Input Tray Empty
1353#
1354# This value can be specified either in hexadecimal (prefixed with 0x),
1355# in octal (prefixed with 0) or in decimal (no prefix).
1356#
1357snmperrormask : 0x4FCC
1358
1359
1360
1361# Defines a set of coefficients for ink accounting.
1362#
1363# Each ink coefficient is the factor of the price per page
1364# you set with pkprinters which would represent the cost
1365# of a page covered at 100% with ink in this particular color.
1366#
1367# With these coefficients, the exact cost of each page
1368# can be computed : for each ink color in the colorspace specified
1369# in the preaccounter and/or accounter directives, we multiply the
1370# base cost per page set with pkprinters by this ink color's coefficient
1371# and by the percent of that page covered with such ink. Then we
1372# sum the values, and repeat the operation for each page. We then
1373# add the base cost per job set with pkprinters, and repeat
1374# the operation recursively in case of nested printers groups.
1375#
1376# The names of the coefficients you should set depend on the colorspace
1377# you want to use for ink accounting :
1378#
1379#       cmyk :
1380#               coefficient_cyan
1381#               coefficient_magenta
1382#               coefficient_yellow
1383#               coefficient_black
1384#
1385#       cmy :
1386#               coefficient_cyan
1387#               coefficient_magenta
1388#               coefficient_yellow
1389#
1390#       rgb :
1391#               coefficient_red
1392#               coefficient_green
1393#               coefficient_blue
1394#
1395#       bw :
1396#               coefficient_black
1397#
1398#       gc :
1399#               coefficient_grayscale
1400#               coefficient_colored
1401#
1402# Any coefficient which is not set is considered to be equal to 1.0
1403#
1404# Coefficients can be set either in the [global] section or in any
1405# [printqueuename] section. The latter taking precedence, as always.
1406#
1407#coefficient_cyan : 1.2
1408#coefficient_magenta : 3
1409#coefficient_yellow : 1.1
1410#coefficient_black : 1.0
Note: See TracBrowser for help on using the browser.