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

Revision 1038, 7.8 kB (checked in by jalet, 21 years ago)

Minor changes

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