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

Revision 3285, 53.0 kB (checked in by jerome, 16 years ago)

Now external preaccounter/accounter scripts must read the print job's datas
from the file pointed to by the PYKOTADATAFILE environment variable, instead
of from their stdin.

  • 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, 2008 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 the file pointed to by the PYKOTADATAFILE environment
603# variable, and prints a single integer on its standard
604# output, representing the number of pages in the print job.
605# Software accounting unfortunately may overcharge users in case of paper
606# jams.
607#
608# Ink computes the price of a print job by parsing the job's datas
609# through pkpgcounter, and using the percents of ink coverage returned
610# for each color in the specified colorspace.
611
612# Supported colorspaces for ink accounting currently are :
613#
614#       bw      ===> Black & White
615#       cmyk    ===> Cyan, Magenta, Yellow, Black
616#       cmy     ===> Cyan, Magenta, Yellow
617#       rgb     ===> Red, Green, Blue
618#       gc      ===> Grayscale, Colored : this is a pseudo colorspace useful
619#                    if all you need is differentiating grayscale from
620#                    colored pages.
621#
622# Supported resolutions for ink accounting are any number of dots
623# per inch comprised between 72 and 1200.
624# IMPORTANT : increasing the resolution increases precision, but
625# increase CPU load a lot at the same time. The default resolution
626# if unset is 72, for 72 dpi.
627# If you want to use ink accounting, you have to define a set of
628# coefficients for each color in the colorspace, as explained
629# further below in this file.
630#
631# You can get hints on which configuration is best for your printers by
632# typing : pkturnkey --doconf
633#
634# In the lines below "%(printer)s" is automatically replaced at run time
635# with your printer's Fully Qualified Domain Name for network printers,
636# if PyKota can extract it from its environment.
637#
638# Examples :
639#
640# accounter : hardware(snmp)
641# accounter : hardware(snmp:private)
642# accounter : hardware(pjl)
643# accounter : hardware(pjl:9101)
644# 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 " ")
645# accounter : hardware(/usr/bin/npadmin --pagecount %(printer)s)
646# 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)
647# accounter : hardware(/bin/cat /usr/share/pykota/pagecount.pjl >/dev/lp0 && /usr/bin/head -2 </dev/lp0 | /usr/bin/tail -1)
648# 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)
649# 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)
650# accounter : software(/usr/bin/pkpgcounter "$PYKOTADATAFILE")
651# accounter : software()
652# accounter : ink(cmyk, 150)
653# accounter : ink(bw, 300)
654# accounter : ink(bw)
655# accounter : ink(cmy, 72)
656# accounter : ink(gc, 72)
657#         
658# This directive can be set either globally or per printer or both.
659# If both are defined, the printer option has priority.
660#         
661# IF YOU PLAN TO USE YOUR OWN SCRIPTS FOR HARDWARE ACCOUNTING,     
662# YOU ABSOLUTELY HAVE TO BE SURE YOU HAVE A SCRIPT WHICH WAITS FOR THE
663# PRINTER BEING READY BEFORE ASKING FOR ITS INTERNAL PAGE COUNTER.
664#         
665# PYKOTA'S 'snmp' and 'pjl' HARDWARE ACCOUNTING METHODS DO THE CORRECT WORK
666# INTERNALLY, BUT SOME OF THE EXAMPLES ABOVE DON'T, YOU HAVE BEEN WARNED.
667#
668# WITH THE SPECIAL MAGIC hardware(snmp) AND hardware(pjl) VALUES, PYKOTA
669# TAKES CARE OF ALL THIS FOR YOU, SO PLEASE UNDERSTAND THAT IT IS PREFERABLE
670# TO USE THESE TWO METHODS : THEY WORK FINE, REQUIRE LITTLE TO NO CPU,
671# AND DO ALL THE HARD WORK AUTOMATICALLY. IF YOU REALLY NEED TO YOU CAN USE
672# YOUR OWN EXTERNAL COMMANDS AS DESCRIBED ABOVE, JUST BE CAREFUL WITH THIS.
673#         
674# Sane default :
675#
676accounter: software()
677
678# Should we ensure that the printer really is idle before
679# sending the job's datas to it ?
680#
681# This directive is only used when you use an internal
682#�hardware accounting mechanism, like hardware(snmp) or
683# hardware(pjl), and is not used for external hardware
684# accounting mechanisms or for software or ink accounting.
685#
686# If PyKota and CUPS are properly configured, i.e. a single
687# computer (the print server) can access to a particular physical
688# printer, or all CUPS+PyKota print servers which access to the
689# same physical printer share a common network directory used
690# by PyKota to lock this printer resource, then it is not necessary
691# to really ensure the printer is idle before the job, because
692# this is already the case : we already wait at the end of the
693# preceding job for the printer to be idle before reading its
694# internal page counter. So setting this value to Yes usually
695# saves a lot of time between jobs, generally around 30 seconds.
696#
697# If you're not sure, leave this value to the default which is No,
698# meaning that before sending the job's datas to the printer, PyKota
699# will ensure this printer is in idle state.
700#
701# If not defined, a value of No is assumed.
702#
703# This value can be set either globally or on a per printer basis
704# If both are defined, the printer option has priority.
705#
706# Sane default :
707#
708skipinitialwait : no
709
710# What is the "pre"-accounter used for precomputing the job's size.
711#
712# Supported values are :
713#
714#  preaccounter: software()       
715#  preaccounter: software(/path/to/your/script)
716#  preaccounter: ink(colorspace, resolution)
717#
718# NB : the preaccounter directive doesn't support hardware() for obvious
719# reasons. If unset, "software()" is assumed. If you use your own script,
720# ensure that it only prints the job's number of pages (or an estimation
721# of it) on its standard output, and that it reads the print job's datas
722# from the file pointed to by the PYKOTADATAFILE environment variable.
723#
724# You may want to define for example 'preaccounter : software(/bin/echo 1)'
725# in the case your printer supports an hardware accounter but pkpgcounter
726# can't parse your printer driver's datas.
727#
728# Supported colorspaces for ink accounting currently are :
729#
730#       bw      ===> Black & White
731#       cmyk    ===> Cyan, Magenta, Yellow, Black
732#       cmy     ===> Cyan, Magenta, Yellow
733#       rgb     ===> Red, Green, Blue
734#       gc      ===> Grayscale, Colored : this is a pseudo colorspace useful
735#                    if all you need is differentiating grayscale from
736#                    colored pages.
737#
738# Supported resolutions for ink accounting are any number of dots
739# per inch comprised between 72 and 1200.
740# IMPORTANT : increasing the resolution increases precision, but
741# increase CPU load a lot at the same time. The default resolution
742# if unset is 72, for 72 dpi.
743#
744# This value can be set either globally or on a per printer basis
745# If both are defined, the printer option has priority.
746#
747# Sane default :
748#
749preaccounter: software()
750
751
752
753# What should we do if the accounter's subprocess doesn't return
754# a valid result (for example doesn't return an integer on its stdout)
755#
756# Valid values are : 'continue' and 'stop'. 'stop' is the default
757# if unset.
758#
759# 'continue' means try to process as usual, this may introduce
760# accounting errors and free jobs. This was the default behavior
761# until v1.20alpha5.
762#
763# 'stop' means fail and stop the print queue. If an accounter
764# error occurs, most of the time this is a misconfiguration, so
765# stopping the print queue is usually the best thing to do
766# until the admin has fixed the configuration.
767#
768# This value can be set either globally or on a per printer basis
769# If both are defined, the printer option has priority.
770#
771# NB : This directive shouldn't do much now because in case
772# of external accounter error, PyKota just loops.
773#
774# onaccountererror: continue
775onaccountererror: stop
776
777
778
779# Print Quota administrator
780# These values can be set either globally or per printer or both.
781# If both are defined, the printer option has priority.
782# If these values are not set, the default admin root
783# and the default adminmail root@localhost are used.
784admin: John Doe
785adminmail: root@localhost
786
787
788
789# Who should we send an email to in case a quota is reached ?
790# possible values are : DevNull, User, Admin, Both, External(some command)
791# The Both value means that the User and the Admin will receive
792# an email message.
793# The DevNull value means no email message will be sent.
794# This value can be set either globally or per printer or both.
795# If both are defined, the printer option has priority.
796# If the value is not set, then the default BOTH applies.
797#
798#   Format of the external syntax :
799#
800#       mailto: external(/usr/bin/mycommand >/dev/null)
801#
802#   You can use :
803#
804#       '%(action)s'            will contain either WARN or DENY
805#       '%(username)s'          will contain the user's name
806#       '%(printername)s'       will contain the printer's name
807#       '%(email)s'             will contain the user's email address
808#       '%(message)s'           will contain the message if you want
809#                               to use it.
810#
811#   on your command line, to pass arguments to your command.
812#   Examples :
813#
814#     mailto: external(/usr/bin/callpager %(username)s "Quota problem on %(printername)s" >/dev/null)
815#
816#   To automatically send a WinPopup message (this may only work with a PDC,
817#   here the same machine does Samba as PDC + CUPS) :
818#
819#     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)
820#
821#   NB : I use ISO-8859-15, but Windows expects UTF-8, so we pipe the message
822#        into iconv before sending it to the Windows user.
823#
824# or more simply :
825#
826#     mailto: external(/usr/share/pykota/mailandpopup.sh %(username)s %(printername)s "%(email)s" "%(message)s" 2>&1 >/dev/null)
827#
828#   NB : The mailandpopup.sh shell script is now included in PyKota
829#
830#   NB : in ANY case, don't forget to redirect your command's standard output
831#        somewhere (e.g. >/dev/null) so that there's no perturbation to the
832#        underlying layer (filter or backend)
833#
834mailto : both
835
836
837
838# The value of the zero for account balance limitations.
839# If a user is limited by balance, he can print until
840# his balance reaches the value defined here. If unset,
841# the default value is 0. Any floating point value
842# is accepted.
843# You'll want to use this to give free credits to your users
844# at the start of the year for example.
845#
846# This option can only appear in the global section
847#
848# balancezero : -0.25
849#
850balancezero: 0.0
851
852
853
854# Grace delay in days
855# This value can be set either globally or per printer or both.
856# If both are defined, the printer option has priority.
857# If the value is not set then the default seven (7) days applies.
858#
859gracedelay : 7
860
861
862
863# Poor man's threshold
864# If account balance reaches below this amount, a warning message
865# is sent through the 'mailto' directive above.
866#
867# If unset, default poor man's threshold is 1.0.
868# This option can only appear in the global section
869#
870poorman : 1.0
871
872
873
874# Poor man's warning message
875# The warning message that is sent if the "poorman" value is reached
876# Again this must appear in the global section
877#
878poorwarn : Your Print Quota account balance is low.
879 Soon you'll not be allowed to print anymore.
880
881
882
883# Soft limit reached warning message
884# The warning message that is sent if the soft quota limit is reached
885# May appear either globally or on a per-printer basis
886#
887softwarn: Your Print Quota Soft Limit is reached.
888 This means that you may still be allowed to print for some
889 time, but you must contact your administrator to purchase
890 more print quota.
891
892
893
894# Hard limit reached error message
895# The error message that is sent if the hard quota limit is reached
896# May appear either globally or on a per-printer basis
897#
898hardwarn: Your Print Quota Hard Limit is reached.
899 This means that you are not allowed to print anymore.
900 Please contact your administrator at root@localhost
901 as soon as possible to solve the problem.
902
903
904
905# Default policy to apply when either :
906#
907#       - Printer doesn't exist in PyKota's database
908#       - User doesn't exist in PyKota's database
909#       - User has no quota entry for this Printer in PyKota's database
910#
911# Value can be either 'allow' or 'deny' or 'external(some command here)'
912#
913# 'Allow' means that the job will be printed even if the printer, the
914# user or this user's print quota entry on this printer doesn't exist
915# in PyKota's database. But the job won't appear in the printing history.
916#
917# 'Deny' means the job will be rejected if any of these three conditions
918# is met.
919#
920# 'External' means any command of your choice will be launched if any
921# of these three conditions is met. Once your command has ended, PyKota
922# will try again to retrieve the printer, user or user's print quota
923# entry from its database. If it fails to find any of them again, the
924# job will be rejected.
925#
926# This value can be set either globally or per printer or both.
927# If both are defined, the printer option has priority.
928# If the value is not set then the default policy DENY applies.
929# There's no policy wrt inexistant groups, they are ignored.
930#
931# external policy can be used to launch any external command of your choice,
932# for example to automatically add the user to the quota database, and set
933# page limits on the current printer if he is unknown :
934#
935#   policy: external(/usr/bin/pkusers --add --skipexisting %(username)s && /usr/bin/edpykota --add --skipexisting --printer %(printername)s --softlimit 50 --hardlimit 60 %(username)s)
936#
937# NB : If you want to limit users by their account balance value, it is preferable to
938# use the following policy to automate user account creation on first print :
939#
940#   policy: external(/usr/bin/autopykota --initbalance 25.0)
941#
942#   This will automatically add the user if he doesn't already exist, and
943#   set his initial balance value to 25.0 (for example). If the user already
944#   exists then his balance value will not be modified.
945#   Please don't use autopykota if you want to limit your users by page
946#   quota, and in any case, carefully read autopykota's help or manpage
947#   and understand its goal before using it in your own configuration.
948#
949# Of course you can launch any command of your choice with this, e.g. :
950#
951#   policy: external(/usr/local/bin/myadminscript.sh %(username)s)
952#
953# You can use :
954#
955#       '%(username)s'          will contain the user's name
956#       '%(printername)s'       will contain the printer's name
957#
958#   On your command line, to pass arguments to your command.
959#
960# If the printer, user, or user quota entry still doesn't exist after
961# external policy command was launched (the external command didn't add it),
962# or if an error occured during the execution of the external policy
963# command, then the job is rejected.
964#
965# By default, we reject all jobs from users not in the database :
966#
967policy: deny
968
969
970
971# Pre and Post Hooks
972# These directives allow the easy plug-in of any command of your choice
973# at different phases of PyKota's execution.
974# Pre and Post Hooks can access some of PyKota's internal information
975# by reading environment variables as described below.
976# The actual phase of PyKota's execution is available in the
977# PYKOTAPHASE environment variable.
978# Pre and Post Hooks can be defined either globally, per printer,
979# or both. If both are defined, the printer specific hook has
980# priority.
981#
982# List of available environment variables :
983# NB : Most of these variables are also available during the execution
984# of external commands defined in the accounter and mailto
985# directives.
986#
987# PYKOTADIRECTORY : The directory containing cupspykota's temporary files
988# PYKOTADATAFILE : The name of the temporary file which contains the
989#                  job's datas
990# PYKOTAFILENAME : The name of the file which contains the job's datas or
991#                  empty if datas come from stdin
992# PYKOTAMD5SUM : Contains an hexadecimal digest of the md5 sum of the job's datas
993# PYKOTAPHASE : BEFORE or AFTER the job is sent to the printer
994# PYKOTAACTION : ALLOW or DENY or WARN for current print job
995# PYKOTAUSERNAME : user's name, possibly modified through the overwrite_jobticket directive.
996# PYKOTAORIGINALUSERNAME : user's name, unmodified.
997# PYKOTAPRINTERNAME : printer's name
998# PYKOTAPGROUPS : list of printers groups the current printer is a member of
999# PYKOTAJOBID : job's id
1000# PYKOTATITLE : job's title
1001# PYKOTACOPIES : number of copies
1002# PYKOTAOPTIONS : job's options
1003# PYKOTABALANCE : user's account balance
1004# PYKOTALIFETIMEPAID : user's grand total paid
1005# PYKOTALIMITBY : user print limiting factor, for example 'quota' or 'balance'
1006# PYKOTAPAGECOUNTER : user's page counter on this printer
1007# PYKOTALIFEPAGECOUNTER : user's life time page counter on this printer
1008# PYKOTASOFTLIMIT : user's soft page limit on this printer
1009# PYKOTAHARDLIMIT : user's hard page limit on this printer
1010# PYKOTADATELIMIT : user's soft to hard limit date limit on this printer
1011# PYKOTASTATUS : contains "CANCELLED" when SIGTERM was received by PyKota
1012#                else is not set.
1013# PYKOTAJOBSIZEBYTES : contains the job's size in bytes. Always available.
1014# PYKOTAPRECOMPUTEDJOBSIZE : contains the precomputed job's size
1015# PYKOTAPRECOMPUTEDJOBPRICE : contains the precomputed job's price
1016# PYKOTAJOBORIGINATINGHOSTNAME : contains the client's hostname if
1017#                                it is possible to retrieve it.
1018# PYKOTAPRINTERHOSTNAME : the printer's hostname or IP address for network
1019#                         printers, or "localhost" if not defined or not
1020#                         meaningful.
1021# PYKOTAWARNCOUNT : the number of times the user was forbidden to print but a banner
1022#                   page was still printed on the current printer.                   
1023# PYKOTAOVERCHARGE : user's overcharging factor.
1024# PYKOTAJOBBILLING : Job's billing code if present, possibly modified through the overwrite_jobticket directive.
1025# PYKOTAORIGINALJOBBILLING : Job's billing code if present, unmodified.
1026# PYKOTAREASON : if the job was denied or a warning needs to be issued, contains
1027#                the message to send to the user.
1028# PYKOTAUSERDESCRIPTION : the user's textual description
1029# PYKOTAPRINTERDESCRIPTION : the printer's textual description
1030# PYKOTAPRINTERPASSTHROUGHMODE : the printer's passthrough mode
1031# PYKOTAPRINTERMAXJOBSIZE : the printer's maximal job size
1032# PYKOTAPRICEPERJOB : the printer's price per job
1033# PYKOTAPRICEPERPAGE : the printer's price per page
1034#
1035
1036
1037# PreHook : gets executed after being sure the user, printer and user quota
1038# entry on the printer both exist in the PyKota database, and after
1039# checking if the user is allowed to print or not, but just before
1040# the job is sent to the printer (if allowed)
1041# prehook has access to many environment variables :
1042#
1043# PYKOTAACTION contains either "ALLOW", "WARN" or "DENY" and
1044# represents the action which is to be done wrt the print job.
1045# PYKOTAPHASE contains 'BEFORE' during execution of prehook
1046#
1047# uncomment the line below to see what environment variables are available
1048# prehook: /usr/bin/printenv >/tmp/before
1049
1050
1051
1052# PostHook : gets executed after the job has been added to the history.
1053# posthook has access to all the environment variables defined above,
1054# as well as two additionnal environment variables : PYKOTAJOBPRICE
1055# and PYKOTAJOBSIZE.
1056# PYKOTAPHASE contains 'AFTER' during execution of posthook.
1057#
1058# uncomment the line below to see what environment variables are available
1059# posthook: /usr/bin/printenv >/tmp/after
1060
1061
1062
1063# AccountBanner : how should banner accounting be done ?
1064#
1065# If enabled, banner pages printed from StartingBanner and/or EndingBanner
1066# (depending on the value) will be included in the accounting for the
1067# print job
1068#
1069# If disabled, banner pages printed from StartingBanner and EndingBanner will
1070# *not* be included in the accounting for the print job
1071#
1072# IMPORTANT : CUPS generated banners are ALWAYS accounted for, although you
1073#             can refund them by using negative prices on printers.
1074#
1075# Allowed values : Starting | Ending | None | Both
1076#
1077#       - Starting : only the starting banner will be accounted for.
1078#       - Ending : only the ending banner will be accounted for.
1079#       - Both : both starting and ending banners will be accounted for.
1080#       - None : banners will not be accounted for.
1081#
1082# Default value :
1083# accountbanner: Both
1084
1085
1086
1087# Maximal number of times the banner will still be printed if
1088# the user is forbidden to print.
1089#
1090# This option can be set either globally or on a per printer basis.
1091# Allowed values are 0 or any positive integer.
1092# Default value is 0, which means that the banner won't be printed
1093# at all if the user is forbidden to print.
1094#
1095maxdenybanners: 0
1096
1097
1098
1099# If a job is cancelled, should any start or end banners still be printed
1100#
1101# This option can be set either globally or on a per printer basis.
1102# If set to yes, any defined banners will be printed
1103# If set to no, no banners will be printed
1104#
1105# This value defaults to yes
1106# printcancelledbanners: yes
1107
1108
1109# If a job is printed by the same person as the last job on the same printer,
1110# should banners be avoided to save some paper
1111#
1112# This option can be set either globally or on a per printer basis.
1113# If set to yes, any duplicate banners will be avoided forever
1114# If set to no or 0, no banners will be avoided (they will all be printed)
1115# If set to any positive integer, banners will be avoided if printed within
1116#     'integer' seconds of the last job
1117#
1118# This value defaults to no
1119# avoidduplicatebanners: yes
1120# avoidduplicatebanners: no
1121# avoidduplicatebanners: 600   
1122
1123
1124# StartingBanner : if defined will print a banner before the rest of the job
1125# is printed. The argument can be a printable file, or an executable file.
1126# If not executable, the file will be printed as is. If executable, the
1127# file will be executed and its standard output will be sent to the printer.
1128#
1129# In any case, the banner content which will be sent to the printer
1130# MUST be in a format your printer will accept !!!
1131#
1132# The pkbanner command included in PyKota can automatically generate
1133# starting and ending banners in the PostScript format. You can use
1134# this command in a pipe through GhostScript if your printer doesn't
1135# accept PostScript as an input format.
1136# NB : pkbanner's default page size is A4
1137#
1138# startingbanner: /home/joe/mystaticbanner.ps
1139# startingbanner: /usr/bin/pkbanner --pagesize=A4 --logo="/home/joe/mylogo.jpeg" --url="http://tech.example.com"
1140# startingbanner: /usr/bin/pkbanner | gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sOutputFile=- -sDEVICE=lj5mono -
1141# startingbanner: /usr/bin/pkbanner
1142
1143
1144
1145# EndingBanner : if defined will print a banner after the job
1146# has been printed. The argument can be a printable file, or an executable file.
1147# If not executable, the file will be printed as is. If executable, the
1148# file will be executed and its standard output will be sent to the printer.
1149#
1150# In any case, the banner content which will be sent to the printer
1151# MUST be in a format your printer will accept !!!
1152#
1153# The pkbanner command included in PyKota can automatically generate
1154# starting and ending banners in the PostScript format. You can use
1155# this command in a pipe through GhostScript if your printer doesn't
1156# accept PostScript as an input format.
1157# NB : pkbanner's default page size is A4
1158#
1159# A static banner page
1160# endingbanner: /home/joe/mystaticbanner.ps
1161#
1162# A banner with personnalized logo and url
1163# endingbanner: /usr/bin/pkbanner --pagesize=A4 --logo="/home/joe/mylogo.jpeg" --url="http://tech.example.com"
1164#
1165# A banner in the format accepted by the printer
1166# endingbanner: /usr/bin/pkbanner | gs -q -dNOPAUSE -dBATCH -dPARANOIDSAFER -sOutputFile=- -sDEVICE=lj5mono -
1167#
1168# A banner with more info on it, extracted from the yellow pages.
1169# the string "Phone 111222333444" will be added to the banner page
1170# if extractphone.sh returns 111222333444 for the current user.
1171# endingbanner: /usr/bin/pkbanner Phone `extractphone.sh $PYKOTAUSERNAME`
1172#
1173# Default PyKota banner
1174# endingbanner: /usr/bin/pkbanner
1175
1176
1177
1178# How should enforcement be done for this printer ?
1179#
1180# "laxist" is the default if value is not set, and allows users
1181# to be over quota on their last job.
1182#
1183# "strict" tries to prevent users from ever being over quota.
1184#
1185# Enforcement can be defined either globally, per printer,
1186# or both. If both are defined, the printer specific enforcement
1187# setting has priority.
1188#
1189# valid values : "strict" or "laxist"
1190#
1191# default value when not set is "laxist"
1192#
1193# enforcement : laxist
1194enforcement : strict
1195
1196
1197
1198# Should we trust the job size on this printer ?
1199#
1200# "trustjobsize : yes" is the default, the jobsize, either computed
1201# by the hardware or by software is trusted.
1202#
1203# "trustjobsize : >N:precomputed" : uses the precomputed value
1204#                                   if jobsize > N pages
1205# "trustjobsize : >N:25" : uses 25 if jobsize is >N pages
1206#
1207# General form : ">n:m" where n is a positive integer, and m is
1208# either the word 'precomputed' or a positive integer.
1209# The special form "yes" is also accepted and is the default.
1210#
1211# This directive can be set either globally or on a per printer
1212# basis. Use this directive when hardware accounting for a particular
1213# printer produces some glitches due to the printer returning
1214# incorrect answers.
1215#
1216# NB : DON'T MODIFY THIS IF YOU DON'T NEED TO. THIS IS ONLY TO BE USED
1217# AS A WORKAROUND FOR SOME PRINTERS. IT'S PROBABLY BETTER TO ALWAYS
1218# SET THIS DIRECTIVE TO 'yes'. THIS DIRECTIVE WILL ONLY BE HONORED
1219# IF PYKOTA DETECTS A DIFFERENCE BETWEEN THE PRECOMPUTED JOB SIZE
1220# AND THE JOB SIZE AS COMPUTED BY PYKOTA EITHER USING HARDWARE OR
1221# SOFTWARE.
1222#
1223trustjobsize : yes
1224
1225
1226
1227# Should we deny duplicate jobs ?
1228#
1229# A duplicate is a job sent twice (or more) in a row to the same printer
1230# by the same user.
1231#
1232# This can be defined either globally or on a per printer basis
1233# The default value is 'no', meaning that duplicate jobs are
1234# allowed.
1235#
1236# NB : if an user prints a job, a second user prints another
1237#      job, and the first user prints the first job again,
1238#      this is NOT considered as a duplicate since the two
1239#      identical jobs printed by the first user are not
1240#      one just after the other.
1241#
1242# Possible values are 'yes', 'no', or any other string.
1243# If the string is not recognized as a truth value,
1244# it is considered to be a command to launch.
1245# PyKota launches the command and parses its standard
1246# output. The special keywords 'ALLOW' and 'DENY' are
1247# recognized, allowing an external tool to decide if
1248# the job is to be allowed or denied.
1249#
1250# denyduplicates : /usr/bin/myowncommand with some arguments
1251# denyduplicates : yes
1252denyduplicates : no
1253
1254
1255
1256# Sets the delay in seconds after which two identical jobs are
1257# not considered as being a duplicate.
1258#
1259# This can be defined either globally or on a per printer basis
1260# The default value if not set is 0, for 0 seconds.
1261# duplicatesdelay : 300
1262duplicatesdelay : 0
1263
1264
1265
1266# Sets the maximum number of seconds to wait for the printer
1267# being in 'printing' mode once the job has been sent to it.
1268# Once this delay is expired, PyKota will consider this job
1269# will never be printed, aborts the hardware accounting
1270# process, and uses the latest internal page counter value seen.
1271#
1272# Increasing this value, or setting it to 0, may help with some
1273# printers which don't conform to RFC3805. Problem reported on a
1274# Samsung ML2551n gave a way for clever students to bypass
1275# hardware accounting entirely by removing the paper from
1276# the paper tray before the job had begun to print, then
1277# waiting 60 seconds, and putting the paper back in the tray...
1278#
1279# IMPORTANT : always ensure that your printers' firmware is up
1280# to date.
1281#
1282# This directive can be set either globally or on a per printer
1283# basis.
1284#
1285# When not set, an hardcoded value of 60 seconds is used.
1286# When set to 0, PyKota will wait indefinitely until the
1287# printer switches to the 'printing' status.
1288noprintingmaxdelay : 60
1289
1290
1291
1292# Defines the number of times the 'idle' printer status
1293# has to be reported before it being considered stable.
1294# Each check is done every 'statusstabilizationdelay' seconds
1295# as defined below.
1296#
1297# This directive can be set either globally or on a per printer
1298# basis.
1299#
1300# When not set, an hardcoded value of 5 times is used.
1301# The value must be a strictly positive integer.
1302statusstabilizationloops : 5
1303
1304
1305
1306# Defines the number of seconds to wait between two consecutive
1307# checks of the printer's status when using hardware accounting.
1308#
1309# Each check is done up to 'statusstabilizationloops' times.
1310#
1311# This directive can be set either globally or on a per printer
1312# basis.
1313#
1314# When not set, an hardcoded value of 4.0 seconds is used.
1315# The value must be a positive floating point value greater
1316# than or equal to 0.25 seconds.
1317statusstabilizationdelay : 4.0
1318
1319
1320
1321# Defines a (16 bits) bit mask to specify the set of error conditions
1322# reported through SNMP for which PyKota has to wait indefinitely
1323# until such an error is fixed before continuing with printing
1324# and/or accounting.
1325#
1326# This directive can be set either globally or on a per printer
1327# basis.
1328#
1329# The 16 bit values are specified as in RFC3805 (Printer MIB v2),
1330# as an ORed value of one or more of the following conditions :
1331#
1332#       1000 0000 0000 0000 : Low Paper
1333#       0100 0000 0000 0000 : No Paper
1334#       0010 0000 0000 0000 : Low Toner
1335#       0001 0000 0000 0000 : No Toner
1336#       0000 1000 0000 0000 : Door Open
1337#       0000 0100 0000 0000 : Jammed
1338#       0000 0010 0000 0000 : Offline
1339#       0000 0001 0000 0000 : Service Requested
1340#       0000 0000 1000 0000 : Input Tray Missing
1341#       0000 0000 0100 0000 : Output Tray Missing
1342#       0000 0000 0010 0000 : Marker Supply Missing
1343#       0000 0000 0001 0000 : Output Near Full
1344#       0000 0000 0000 1000 : Output Full
1345#       0000 0000 0000 0100 : Input Tray Empty
1346#       0000 0000 0000 0010 : Overdue Preventive Maintainance
1347#       0000 0000 0000 0001 : Not assigned
1348#
1349# When not set, an hardcoded value of hexadecimal 0x4FCC is used,
1350# which means that PyKota will wait indefinitely when using SNMP
1351# hardware accounting if one of the following conditions is met :
1352#
1353#   No Paper, Door Open, Jammed, Offline, Service Requested,
1354#   Input Tray Missing, Output Tray Missing, Output Full, Input Tray Empty
1355#
1356# This value can be specified either in hexadecimal (prefixed with 0x),
1357# in octal (prefixed with 0) or in decimal (no prefix).
1358#
1359snmperrormask : 0x4FCC
1360
1361
1362
1363# Defines a set of coefficients for ink accounting.
1364#
1365# Each ink coefficient is the factor of the price per page
1366# you set with pkprinters which would represent the cost
1367# of a page covered at 100% with ink in this particular color.
1368#
1369# With these coefficients, the exact cost of each page
1370# can be computed : for each ink color in the colorspace specified
1371# in the preaccounter and/or accounter directives, we multiply the
1372# base cost per page set with pkprinters by this ink color's coefficient
1373# and by the percent of that page covered with such ink. Then we
1374# sum the values, and repeat the operation for each page. We then
1375# add the base cost per job set with pkprinters, and repeat
1376# the operation recursively in case of nested printers groups.
1377#
1378# The names of the coefficients you should set depend on the colorspace
1379# you want to use for ink accounting :
1380#
1381#       cmyk :
1382#               coefficient_cyan
1383#               coefficient_magenta
1384#               coefficient_yellow
1385#               coefficient_black
1386#
1387#       cmy :
1388#               coefficient_cyan
1389#               coefficient_magenta
1390#               coefficient_yellow
1391#
1392#       rgb :
1393#               coefficient_red
1394#               coefficient_green
1395#               coefficient_blue
1396#
1397#       bw :
1398#               coefficient_black
1399#
1400#       gc :
1401#               coefficient_grayscale
1402#               coefficient_colored
1403#
1404# Any coefficient which is not set is considered to be equal to 1.0
1405#
1406# Coefficients can be set either in the [global] section or in any
1407# [printqueuename] section. The latter taking precedence, as always.
1408#
1409#coefficient_cyan : 1.2
1410#coefficient_magenta : 3
1411#coefficient_yellow : 1.1
1412#coefficient_black : 1.0
Note: See TracBrowser for help on using the browser.