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

Revision 3481, 53.1 kB (checked in by jerome, 15 years ago)

Changed copyright years.
Copyright years are now dynamic when displayed by a command line tool.

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