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

Revision 1087, 10.2 kB (checked in by jalet, 21 years ago)

Really big modifications wrt new configuration file's location and content.

  • 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 into the /etc/pykota/ directory
4# under the name /etc/pykota/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 PGStorage (PostgreSQL) and LDAPStorage (OpenLDAP) are supported.
29# MySQL and BerkeleyDB are planned.
30
31# the 'postgresql' value is deprecated, use 'pgstorage' instead.
32storagebackend: pgstorage
33
34# Quota Storage Server hostname (and optional port)
35# e.g. db.mydomain.com:5432
36storageserver: localhost
37
38#
39# name of the Quota Storage Database
40storagename: pykota
41
42#
43# Quota Storage normal user's name and password
44# These two fields contain a username and optional password
45# which may give readonly access to your print quota database.
46#
47# PLEASE ENSURE THAT THIS USER CAN'T WRITE TO YOUR PRINT QUOTA
48# DATABASE, OTHERWISE ANY USER WHO COULD READ THIS CONFIGURATION
49# FILE COULD CHANGE HIS PRINT QUOTA.
50#
51storageuser: pykotauser
52# storageuserpw: Comment out if unused, or set to Quota Storage user password
53
54# NB : storageuser and storageuserpw are not used anymore
55
56# LDAP example, uncomment and adapt it to your own configuration :
57#storagebackend: ldapstorage
58#storageserver: ldap://ldap.librelogiciel.com:389
59#storagename: dc=librelogiciel,dc=com
60#storageuser: cn=notadmin,dc=librelogiciel,dc=com
61#storageuserpw: abc.123
62#
63# Here we define some helpers to know where
64# to plug into an existing LDAP directory
65#userbase: ou=People,dc=librelogiciel,dc=com
66#userrdn: uid
67#balancebase: ou=People,dc=librelogiciel,dc=com
68#balancerdn: uid
69#groupbase: ou=Groups,dc=librelogiciel,dc=com
70#grouprdn: cn
71#printerbase: ou=Printers,ou=PyKota,dc=librelogiciel,dc=com
72#printerrdn: cn
73#jobbase: ou=Jobs,ou=PyKota,dc=librelogiciel,dc=com
74#userquotabase: ou=UQuotas,ou=PyKota,dc=librelogiciel,dc=com
75#groupquotabase: ou=GQuotas,ou=PyKota,dc=librelogiciel,dc=com
76#lastjobbase: ou=LastJobs,ou=PyKota,dc=librelogiciel,dc=com
77#
78# Choose what attribute contains the list of group members
79# common values are : memberUid, uniqueMember, member
80#groupmembers: memberUid
81
82# Where to log ?
83# supported values : stderr, system (system means syslog, but don't use 'syslog' here)
84# if the value is not set then the default SYSTEM applies.
85logger: system
86
87# Enable debugging ? Put YES instead here,
88# but only if something went wrong and you want
89# to learn from where the problem comes from.
90# Actually only database queries are logged.
91debug : No
92
93# Mail server to use to warn users
94# If the value is not set then localhost is used.
95smtpserver: localhost
96
97# What is the accounting backend to use
98#
99# supported values :
100#
101#    - querying : asks the printer for its lifetime page counter
102#                 via either SNMP, AppleTalk, or any external
103#                 command. This method is the method used by
104#                 default in PyKota since its beginning.
105#
106#    - external : delegates the job's size computation to any
107#                 external command of your choice. A stupid and
108#                 completely unreliable example, but which
109#                 shows what this command may be is :
110#
111#                   accounter: external(/bin/grep -c showpage)
112#
113#                 Another one, which should work with all DSC
114#                 compliant Postscript files :
115#
116#                   accounter: external(/bin/grep -c "%%Page:")
117#
118#    - stupid : counts the occurences of the 'showpage' postscript
119#               statement in the document to be printed.
120#               THIS IS NOT RELIABLE. This is just to serve as
121#               an example on how to implement your own accounting
122#               method.
123#
124# This value can be set either globally or on a per printer basis
125# If both are defined, the printer option has priority.
126# if not set it defaults to 'querying'.
127#
128# A script which seems to be accurate, copy it from the
129# untested/postscript directory to another place.
130# accounter: external(/usr/local/bin/pagecount.sh)
131# WARNING : it may not work when multiple copies are asked.
132#           this breaks ghostscript, I don't know why yet.
133#
134# default value
135accounter: querying
136
137# Print Quota administrator
138# These values can be set either globally or per printer or both.
139# If both are defined, the printer option has priority.
140# If these values are not set, the default admin root
141# and the default adminmail root@localhost are used.
142admin: Jerome Alet
143adminmail: alet@librelogiciel.com
144
145#
146# Who should we send an email to in case a quota is reached ?
147# possible values are : DevNull, User, Admin, Both
148# The Both value means that the User and the Admin will receive
149# an email message.
150# The DevNull value means no email message will be sent.
151# This value can be set either globally or per printer or both.
152# If both are defined, the printer option has priority.
153# If the value is not set, then the default BOTH applies.
154mailto: both
155
156#
157# Grace delay in days
158# This value can be set either globally or per printer or both.
159# If both are defined, the printer option has priority.
160# If the value is not set then the default seven (7) days applies.
161gracedelay: 7
162
163#
164# Poor man's threshold
165# If account balance reaches below this amount,
166# a warning message is sent by email
167#
168# If unset, default poor man's threshold is 1.0.
169# This option can only appear in the global section
170poorman: 2.0
171
172# Poor man's warning message
173# The warning message that is sent if the "poorman" value is reached
174# Again this must appear in the global section
175poorwarn: Your Print Quota account balance is low.
176 Soon you'll not be allowed to print anymore.
177
178# Soft limit reached warning message
179# The warning message that is sent if the soft quota limit is reached
180# May appear either globally or on a per-printer basis
181softwarn: Your Print Quota Soft Limit is reached.
182 This means that you may still be allowed to print for some
183 time, but you must contact your administrator to purchase
184 more print quota.
185 
186# Hard limit reached error message
187# The error message that is sent if the hard quota limit is reached
188# May appear either globally or on a per-printer basis
189hardwarn: Your Print Quota Hard Limit is reached.
190 This means that you are not allowed to print anymore.
191 Please contact your administrator at root@localhost
192 as soon as possible to solve the problem.
193
194# one section per printer, or no other section at all if all options
195# are defined globally.
196# Each section's name must be the same as the printer's queue name as defined
197# in your printing system, be it CUPS or LPRng.
198# If you don't want any special printer section, just comment out
199# the line below so that following options are global.
200[hpmarketing]
201
202# How to query the hpmarketing printer for its page counter.
203# THIS IS ONLY USED IF YOU HAVE SET 'accounter' TO 'querying'
204# JUST COMMENT IT OUT IF YOU USE ANY OTHER ACCOUNTING METHOD.
205# (it would be ignored anyway)
206#
207# In the lines below "%(printer)s" is automatically replaced
208# at run time with your printer's Fully Qualified Domain Name
209# e.g. myprinter.domain.com
210#
211# Only snmp(community, oid) and external(command) are supported
212#
213# Example :
214#     requester: external(/usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
215# and :
216#     requester: snmp(public, mib-2.43.10.2.1.4.1.1)
217# are equivalent
218#
219# Another untested example, using npadmin :
220#     requester: external(/usr/bin/npadmin --pagecount %(printer)s)
221#
222# Another example, for AppleTalk printers which works fine :
223# (You may need the pap CUPS backend installed, and copy the
224# pagecount.ps file from untested/netatalk into /etc or any
225# appropriate location)
226#     requester: external(/usr/bin/pap -p "%(printer)s:LaserWriter" /etc/pagecount.ps  2>/dev/null | grep -v status | grep -v Connect | tail -1)
227#
228# This value can be set either globally or per printer or both.
229# If both are defined, the printer option has priority.
230#
231# NB : The SNMP oid mib-2.43.10.2.1.4.1.1 works on HP Laserjet Printers, but it may
232#      be different with other brands, refer to your printer's documentation
233#      for details. Also you may have to specify -v2c or -v3 depending on your
234#      printer's support for different versions of the SNMP specification.
235#
236#
237# Some examples and comments provided by Bob Martel from csuohio.edu
238#
239# For several printers I could not get the page count using snmpget.  I
240# resorted to snmpwalk:
241#
242# requester: external(/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)
243#
244# The last example is still more ugly, some of the printers only provided
245# their counters without names, but at least always on the same line:
246#
247# requester: external(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public -Ov %(printer)s | grep Counter32 | tail -2 | head -1 | cut -d " " -f2)
248#
249#
250# WARNING : In any case, when using an external requester, please test the command line outside
251#           of PyKota before. This will save you some headaches in case it doesn't work as expected.
252requester: external(/usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ")
253
254# Default policy for inexistant users (e.g. root)
255# either allow or deny
256# This value can be set either globally or per printer or both.
257# If both are defined, the printer option has priority.
258# If the value is not set then the default policy DENY applies.
259# ATTENTION :
260#     Before 1.04 the default value was ALLOW, but unknown users
261#     allowed to print causes accuracy problems : their jobs are
262#     charged to the next person who prints on the same printer.
263# There's no policy wrt inexistant groups, they are ignored.
264policy: deny
Note: See TracBrowser for help on using the browser.