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

Revision 1025, 7.4 kB (checked in by jalet, 21 years ago)

Sample printer name which resembles a sample printer name now ! (finally)

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