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

Revision 1016, 6.7 kB (checked in by jalet, 21 years ago)

More good work on LDAP storage.

  • 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# LDAP example :
47#storagebackend: ldapstorage
48#storageserver: ldap://ldap.librelogiciel.com:389
49#storagename: dc=librelogiciel,dc=com
50#storageadmin: cn=admin,dc=librelogiciel,dc=com
51#storageuser: cn=admin,dc=librelogiciel,dc=com
52#storageadminpw: abc.123
53#storageuserpw: xyz.345
54
55# Where to log ?
56# supported values : stderr, system (system means syslog, but don't use 'syslog' here)
57# if the value is not set then the default SYSTEM applies.
58logger: system
59
60# Mail server to use to warn users
61# If the value is not set then localhost is used.
62smtpserver: localhost
63
64# What is the accounting backend to use
65#
66# supported values :
67#
68#    - querying : asks the printer for its lifetime page counter
69#                 via either SNMP, AppleTalk, or any external
70#                 command. This method is the method used by
71#                 default in PyKota since its beginning.
72#
73#    - external : delegates the job's size computation to any
74#                 external command of your choice. A stupid and
75#                 completely unreliable example, but which
76#                 shows what this command may be is :
77#
78#                   accounter: external(/bin/grep -c showpage)
79#
80#                 Another one, which should work with all DSC
81#                 compliant Postscript files :
82#
83#                   accounter: external(/bin/grep -c "%%Page:")
84#
85#    - stupid : counts the occurences of the 'showpage' postscript
86#               statement in the document to be printed.
87#               THIS IS NOT RELIABLE. This is just to serve as
88#               an example on how to implement your own accounting
89#               method.
90#
91# This value can be set either globally or on a per printer basis
92# If both are defined, the printer option has priority.
93# if not set it defaults to 'querying'.
94#
95# A script which seems to be accurate, copy it from the
96# untested/postscript directory to another place.
97# accounter: external(/usr/local/bin/pagecount.sh)
98# WARNING : it may not work when multiple copies are asked.
99#           this breaks ghostscript, I don't know why yet.
100#
101# default value
102accounter: querying
103
104# Print Quota administrator
105# These values can be set either globally or per printer or both.
106# If both are defined, the printer option has priority.
107# If these values are not set, the default admin root
108# and the default adminmail root@localhost are used.
109admin: Jerome Alet
110adminmail: alet@librelogiciel.com
111
112#
113# Who should we send an email to in case a quota is reached ?
114# possible values are : DevNull, User, Admin, Both
115# The Both value means that the User and the Admin will receive
116# an email message.
117# The DevNull value means no email message will be sent.
118# This value can be set either globally or per printer or both.
119# If both are defined, the printer option has priority.
120# If the value is not set, then the default BOTH applies.
121mailto: both
122
123#
124# Grace delay in days
125# This value can be set either globally or per printer or both.
126# If both are defined, the printer option has priority.
127# If the value is not set then the default seven (7) days applies.
128gracedelay: 7
129
130# one section per printer, or no other section at all if all options
131# are defined globally
132[lp]
133
134# How to query the lp printer for its page counter.
135# THIS IS ONLY USED IF YOU HAVE SET 'accounter' TO 'querying'
136# JUST COMMENT IT OUT IF YOU USE ANY OTHER ACCOUNTING METHOD.
137# (it would be ignored anyway)
138#
139# Only snmp(community, oid) and external(command) are supported
140#
141# Example :
142#     requester: external(snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
143# and :
144#     requester: snmp(public, mib-2.43.10.2.1.4.1.1)
145# are equivalent
146#
147# Another untested example, using npadmin :
148#     requester: external(npadmin --pagecount %(printer)s)
149#
150# Another example, for AppleTalk printers which works fine :
151# (You may need the pap CUPS backend installed, and copy the
152# pagecount.ps file from untested/netatalk into /etc or any
153# appropriate location)
154#     requester: external(/usr/bin/pap -p "%(printer)s:LaserWriter" /etc/pagecount.ps  2>/dev/null | grep -v status | grep -v Connect | tail -1)
155#
156# This value can be set either globally or per printer or both.
157# If both are defined, the printer option has priority.
158#
159# NB : The SNMP oid mib-2.43.10.2.1.4.1.1 works on HP Laserjet Printers, but it may
160#      be different with other brands, refer to your printer's documentation
161#      for details. Also you may have to specify -v2c or -v3 depending on your
162#      printer's support for different versions of the SNMP specification.
163#
164# WARNING : In any case, when using an external requester, please test the command line outside
165#           of PyKota before. This will save you some headaches in case it doesn't work as expected.
166requester: external(snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
167
168# Default policy for inexistant users (e.g. root)
169# either allow or deny
170# This value can be set either globally or per printer or both.
171# If both are defined, the printer option has priority.
172# If the value is not set then the default policy DENY applies.
173# ATTENTION :
174#     Before 1.04 the default value was ALLOW, but unknown users
175#     allowed to print causes accuracy problems : their jobs are
176#     charged to the next person who prints on the same printer.
177policy: deny
Note: See TracBrowser for help on using the browser.