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

Revision 994, 5.9 kB (checked in by jalet, 21 years ago)

The sample configuration file now suggests untested/postscript/pagecount.sh
as a valid and probably accurate external accounter.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# PyKota sample configuration file
2#
3# Copy this file in cups' configuration directory
4# usually /etc/cups under the name pykota.conf
5#
6# PyKota - Print Quotas for CUPS and LPRng
7#
8# (c) 2003 Jerome Alet <alet@librelogiciel.com>
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22#
23# $Id$
24#
25
26[global]
27# Storage backend for quotas
28# only PostgreSQL is supported
29# Ldap, MySQL, Berkeley are planned
30storagebackend: postgresql
31
32# Quota Storage Server hostname (and optional port)
33# e.g. db.mydomain.com:5432
34storageserver: localhost
35
36#
37# name of the Quota Storage Database
38storagename: pykota
39
40# Quota Storage administrator's and normal user's names and passwords
41storageadmin: pykotaadmin
42storageuser: pykotauser
43# storageadminpw: Comment out if unused, or set to Quota Storage admin password
44# storageuserpw: Comment out if unused, or set to Quota Storage user password
45
46# Where to log ?
47# supported values : stderr, system (system means syslog, but don't use 'syslog' here)
48# if the value is not set then the default SYSTEM applies.
49logger: system
50
51# Mail server to use to warn users
52# If the value is not set then localhost is used.
53smtpserver: localhost
54
55# What is the accounting backend to use
56#
57# supported values :
58#
59#    - querying : asks the printer for its lifetime page counter
60#                 via either SNMP, AppleTalk, or any external
61#                 command. This method is the method used by
62#                 default in PyKota since its beginning.
63#
64#    - external : delegates the job's size computation to any
65#                 external command of your choice. A stupid and
66#                 completely unreliable example, but which
67#                 shows what this command may be is :
68#
69#                   accounter: external(/bin/grep -c showpage)
70#
71#    - stupid : counts the occurences of the 'showpage' postscript
72#               statement in the document to be printed, only at
73#               the beginning of each line which makes the postscript
74#               file. THIS IS NOT RELIABLE. This is just to serve as
75#               an example on how to implement your own accounting
76#               method.
77#
78# This value can be set either globally or on a per printer basis
79# If both are defined, the printer option has priority.
80# if not set it defaults to 'querying'.
81#
82# A script which seems to be accurate, copy it from the
83# untested/postscript directory to another place.
84# accounter: external(/usr/local/bin/pagecount.sh)
85#
86# default value
87accounter: querying
88
89# Print Quota administrator
90# These values can be set either globally or per printer or both.
91# If both are defined, the printer option has priority.
92# If these values are not set, the default admin root
93# and the default adminmail root@localhost are used.
94admin: Jerome Alet
95adminmail: alet@librelogiciel.com
96
97#
98# Who should we send an email to in case a quota is reached ?
99# possible values are : DevNull, User, Admin, Both
100# The Both value means that the User and the Admin will receive
101# an email message.
102# The DevNull value means no email message will be sent.
103# This value can be set either globally or per printer or both.
104# If both are defined, the printer option has priority.
105# If the value is not set, then the default BOTH applies.
106mailto: both
107
108#
109# Grace delay in days
110# This value can be set either globally or per printer or both.
111# If both are defined, the printer option has priority.
112# If the value is not set then the default seven (7) days applies.
113gracedelay: 7
114
115# one section per printer, or no other section at all if all options
116# are defined globally
117[lp]
118
119# How to query the lp printer for its page counter.
120# THIS IS ONLY USED IF YOU HAVE SET 'accounter' TO 'querying'
121# JUST COMMENT IT OUT IF YOU USE ANY OTHER ACCOUNTING METHOD.
122# Only snmp(community, oid) and external(command) are supported
123#
124# Example :
125#     requester: external(snmpget -c public -Ov %(printer)s 43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
126# and :
127#     requester: snmp(public, 43.10.2.1.4.1.1)
128# are equivalent
129#
130# Another untested example, using npadmin :
131#     requester: external(npadmin --pagecount %(printer)s)
132#
133# Another example, for AppleTalk printers which works fine :
134# (You may need the pap CUPS backend installed, and copy the
135# pagecount.ps file from untested/netatalk into /etc or any
136# appropriate location)
137#     requester: external(/usr/bin/pap -p "%(printer)s:LaserWriter" /etc/pagecount.ps  2>/dev/null | grep -v status | grep -v Connect | tail -1)
138#
139# This value can be set either globally or per printer or both.
140# If both are defined, the printer option has priority.
141#
142# NB : The SNMP oid 43.10.2.1.4.1.1 works on HP Laserjet Printers, but it may
143#      be different with other brands, refer to your printer's documentation
144#      for details.
145requester: external(snmpget -c public -Ov %(printer)s 43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
146
147
148# Default policy for inexistant users (e.g. root)
149# either allow or deny
150# This value can be set either globally or per printer or both.
151# If both are defined, the printer option has priority.
152# If the value is not set then the default policy DENY applies.
153# ATTENTION :
154#     Before 1.04 the default value was ALLOW, but unknown users
155#     allowed to print causes accuracy problems : their jobs are
156#     charged to the next person who prints on the same printer.
157policy: deny
Note: See TracBrowser for help on using the browser.