[695] | 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 |
---|
| 7 | # |
---|
| 8 | # (c) 2003 Jerome Alet <alet@librelogiciel.com> |
---|
[873] | 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. |
---|
[695] | 13 | # |
---|
[873] | 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. |
---|
[695] | 22 | # |
---|
| 23 | # $Id$ |
---|
| 24 | # |
---|
| 25 | |
---|
| 26 | [global] |
---|
| 27 | # Storage backend for quotas |
---|
| 28 | # only PostgreSQL is supported |
---|
| 29 | # Ldap, MySQL, Berkeley are planned |
---|
| 30 | storagebackend: postgresql |
---|
[859] | 31 | |
---|
| 32 | # Quota Storage Server hostname (and port) |
---|
| 33 | # e.g. db.mydomain.com:5432 |
---|
[695] | 34 | storageserver: localhost |
---|
[859] | 35 | |
---|
| 36 | # |
---|
| 37 | # name of the Quota Storage Database |
---|
[695] | 38 | storagename: pykota |
---|
[859] | 39 | |
---|
| 40 | # Quota Storage administrator's and normal user's names and passwords |
---|
[695] | 41 | storageadmin: pykotaadmin |
---|
| 42 | storageuser: pykotauser |
---|
[806] | 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 |
---|
[695] | 45 | |
---|
| 46 | # Where to log ? |
---|
[707] | 47 | # supported values : stderr, system (system means syslog, but don't use 'syslog' here) |
---|
[853] | 48 | # if the value is not set then the default SYSTEM applies. |
---|
[782] | 49 | logger: system |
---|
[695] | 50 | |
---|
| 51 | # Mail server to use to warn users |
---|
[853] | 52 | # If the value is not set then localhost is used. |
---|
[695] | 53 | smtpserver: localhost |
---|
[806] | 54 | |
---|
[695] | 55 | # Accounting method |
---|
| 56 | # Only LAZY is currently supported, see documentation |
---|
| 57 | method: lazy |
---|
[806] | 58 | |
---|
| 59 | # Print Quota administrator |
---|
| 60 | # These values can be set either globally or per printer or both. |
---|
| 61 | # If both are defined, the printer option has priority. |
---|
[853] | 62 | # If these values are not set, the default admin root |
---|
| 63 | # and the default adminmail root@localhost are used. |
---|
[806] | 64 | admin: Jerome Alet |
---|
| 65 | adminmail: alet@librelogiciel.com |
---|
| 66 | |
---|
[695] | 67 | # |
---|
[852] | 68 | # Who should we send an email to in case a quota is reached ? |
---|
| 69 | # possible values are : DevNull, User, Admin, Both |
---|
| 70 | # The Both value means that the User and the Admin will receive |
---|
| 71 | # an email message. |
---|
| 72 | # The DevNull value means no email message will be sent. |
---|
| 73 | # This value can be set either globally or per printer or both. |
---|
| 74 | # If both are defined, the printer option has priority. |
---|
[853] | 75 | # If the value is not set, then the default BOTH applies. |
---|
[852] | 76 | mailto: both |
---|
| 77 | |
---|
| 78 | # |
---|
[695] | 79 | # Grace delay in days |
---|
[806] | 80 | # This value can be set either globally or per printer or both. |
---|
| 81 | # If both are defined, the printer option has priority. |
---|
[853] | 82 | # If the value is not set then the default seven (7) days applies. |
---|
[695] | 83 | gracedelay: 7 |
---|
| 84 | |
---|
[853] | 85 | # one section per printer, or no other section at all if all options |
---|
| 86 | # are defined globally |
---|
[695] | 87 | [lp] |
---|
[806] | 88 | |
---|
[695] | 89 | # How to query the lp printer for its page counter |
---|
[780] | 90 | # Only snmp(community, oid) and external(command) are supported |
---|
[903] | 91 | # |
---|
| 92 | # Example : |
---|
| 93 | # requester: external(snmpget -c public -Ov %(printer)s 43.10.2.1.4.1.1 | cut -f 2,2 -d " ") |
---|
[780] | 94 | # and : |
---|
[903] | 95 | # requester: snmp(public, 43.10.2.1.4.1.1) |
---|
[794] | 96 | # are equivalent |
---|
[903] | 97 | # |
---|
| 98 | # Another untested example, using npadmin : |
---|
| 99 | # requester: external(npadmin --pagecount %(printer)s) |
---|
| 100 | # |
---|
[806] | 101 | # This value can be set either globally or per printer or both. |
---|
| 102 | # If both are defined, the printer option has priority. |
---|
[830] | 103 | # |
---|
| 104 | # NB : The SNMP oid 43.10.2.1.4.1.1 works on HP Laserjet Printers, but it may |
---|
| 105 | # be different with other brands, refer to your printer's documentation |
---|
| 106 | # for details. |
---|
[787] | 107 | requester: external(snmpget -c public -Ov %(printer)s 43.10.2.1.4.1.1 | cut -f 2,2 -d " ") |
---|
[806] | 108 | |
---|
[695] | 109 | # Default policy for inexistant users (e.g. root) |
---|
[713] | 110 | # either allow or deny |
---|
[806] | 111 | # This value can be set either globally or per printer or both. |
---|
| 112 | # If both are defined, the printer option has priority. |
---|
[853] | 113 | # If the value is not set then the default policy ALLOW applies. |
---|
[713] | 114 | policy: allow |
---|