Changeset 2837

Show
Ignore:
Timestamp:
04/06/06 23:39:23 (19 years ago)
Author:
jerome
Message:

Clarified the sample configuration files.

Location:
pykota/trunk/conf
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/conf/pykota.conf.sample

    r2819 r2837  
    4646# 
    4747 
     48 
     49# 
     50# All directives must be placed below the following line 
    4851[global] 
    49 # Storage backend for quotas 
    50 # only PGStorage (PostgreSQL), LDAPStorage (OpenLDAP or else), 
    51 # MySQLStorage (MySQL) and SQLiteStorage (SQLite 3) are supported. 
    52 # 
    53 # BerkeleyDB is planned. 
     52 
     53 
    5454 
    5555#################################################################### 
     
    5959#storagebackend : sqlitestorage 
    6060#storagename: /etc/pykota/pykota.db 
     61 
     62#################################################################### 
     63 
     64 
    6165 
    6266############################################################################ 
     
    8690# In the line below change the password's value if needed. 
    8791storageuserpw : readonlypw 
     92 
     93############################################################################ 
     94 
     95 
    8896 
    8997#################################################################### 
     
    159167# 
    160168# LDAP attribute which stores the user's email address 
     169# 
    161170#usermail : mail 
    162171 
     
    164173# Choose what attribute contains the list of group members 
    165174# common values are : memberUid, uniqueMember, member 
     175# 
    166176#groupmembers: memberUid 
    167177 
     
    175185# BEWARE : SETTING THIS TO 'YES' CAUSES PROBLEMS FOR NOW 
    176186# BETTER TO LET IT SET TO 'NO' 
     187# 
    177188# ldapcache: no 
    178189 
     190#################################################################### 
     191 
    179192############################################################# 
    180 # ALL directives below are common to ALL storage backends   # 
     193# END of database specific directives                       # 
    181194############################################################# 
     195 
     196 
    182197 
    183198# Should the database caching mechanism be enabled or not ? 
     
    197212# 
    198213storagecaching: No 
     214 
     215 
    199216 
    200217# Should full job history be disabled ? 
     
    204221# Disabling the job history with a relationnal backend works too 
    205222# but it's probably less useful than with LDAP. 
     223# 
    206224disablehistory: No 
    207225 
    208 # Where to log ? 
    209 # supported values : stderr, system (system means syslog, but don't use 'syslog' here) 
    210 # if the value is not set then the default SYSTEM applies. 
     226 
     227 
     228# Where to log ?[A 
     229# supported values : stderr, system (system means syslog, but don't use  
     230# 'syslog' here). if the value is not set then the default SYSTEM applies. 
     231# 
    211232logger: system 
     233 
     234 
    212235 
    213236# Enable debugging ? Put YES or NO there. 
     
    221244# so the impact per job is really minimal. Note however that this will 
    222245# add up over a large number of jobs. 
     246# 
    223247debug : Yes 
    224248 
    225 # 
     249 
     250 
    226251# The URL to PyKota's logo when used from the CGI scripts. 
    227252# You can use your own logo by modifying the URL below. 
    228253# If not defined, the default URL is the same as the 
    229 # one defined below 
     254# one defined below : 
     255# 
    230256logourl : http://www.librelogiciel.com/software/PyKota/pykota.png 
    231257 
    232 #  
     258 
     259 
    233260# The destination to which the web browser will be redirected 
    234261# when you click on the logo defined above. 
    235262# If not defined, the default URL is the same as the 
    236 # one defined below 
     263# one defined below : 
     264# 
    237265logolink : http://www.librelogiciel.com/software/ 
    238266 
    239 # 
     267 
     268 
    240269# Mail server to use to warn users 
    241270# If the value is not set then localhost is used. 
     271# 
    242272smtpserver: localhost 
     273 
     274 
    243275 
    244276# Crash messages' recipient : in addition to the log files 
    245277# each software crash can be sent to the author of PyKota 
    246278# or any other person of your choice. By default this 
    247 # is disabled. The recipient pykotacrashed@librelogiciel.com 
    248 # reaches PyKota's author. 
     279# is disabled for privacy concerns (see below). The address 
     280# pykotacrashed@librelogiciel.com reaches PyKota's author. 
    249281# The 'adminmail' (defined a bit below) is CCed. 
    250282# 
     
    255287#        - a copy of the software's environment variables 
    256288#  
    257 # suggested value 
     289# suggested value : 
     290# 
    258291# crashrecipient: pykotacrashed@librelogiciel.com 
     292 
     293 
    259294 
    260295# Email domain 
     
    268303# 
    269304# Set the appropriate value below, example.com set as per RFC2606. 
     305# 
    270306maildomain: example.com 
     307 
     308 
    271309 
    272310# Should we force usernames to be all lowercase when printing ? 
    273311# Default is No.  
    274 # This is a global option only. 
     312# This is a [global] option only. 
    275313# Some people reported that WinXP sends mixed case usernames 
    276314# setting 'utolower: Yes' solves the problem. 
     
    286324# is done, this means that users 'Jerome' and 'jerome' are 
    287325# different. Printer and groups names are ALWAYS case sensitive. 
     326# 
    288327utolower: No 
     328 
     329 
    289330 
    290331# Should we split usernames on a specific separator when printing ? 
    291332# Default is No, i.e. if the value is unset. 
    292 # This is a global option only. 
     333# This is a [global] option only. 
    293334# This option adds support for Samba's Winbind utility, which 
    294335# prefixes usernames with domain name and separator character. 
     
    304345# of the 'utolower' directive), this means that users 'DOMAIN1/jerome', 
    305346# 'Domain2/jerome' and 'jerome' are different.  
     347# 
    306348# winbind_separator: / 
     349 
     350 
    307351 
    308352# When creating users or groups accounts, should we reject users 
     
    316360# 
    317361# reject_unknown: No 
     362 
     363 
    318364 
    319365# Do we want to hide jobs' title, filename and options for privacy 
     
    325371# This option can't be set on a per printer basis, only into the  
    326372# [global] section. 
     373# 
    327374privacy : no 
     375 
     376 
    328377 
    329378# When the real CUPS backend fail, should we modify the 
     
    351400# This value can be set either globally or on a per printer basis 
    352401# If both are defined, the printer option has priority. 
     402# 
    353403# onbackenderror : charge,retry:5:60 
    354404# onbackenderror : retry:0:300 
     
    356406# onbackenderror : charge 
    357407onbackenderror : nocharge 
     408 
     409 
    358410 
    359411# Should we strip off some characters from the beginning of 
     
    366418# This value can be set either globally or on a per printer basis 
    367419# If both are defined, the printer option has priority. 
     420# 
    368421# striptitle : smbprn.?????? 
     422 
     423 
    369424 
    370425# Should we launch a command to overwrite the job's ticket ? 
     
    395450# If both are defined, the printer option has priority. 
    396451# 
     452# examples : 
     453#  
     454# overwrite_jobticket : /usr/bin/pknotify --destination $PYKOTAJOBORIGINATINGHOSTNAME:7654 --timeout 180 --denyafter 3 --checkauth --ask "Username:username:$PYKOTAUSERNAME" "Password:password:" 
    397455# overwrite_jobticket : /path/to/some/script/or/command 
     456 
     457 
    398458 
    399459# What should we do when we print and the billing code used is 
     
    414474# 
    415475# unknown_billingcode : deny 
     476# unknown_billingcode : deny(/usr/bin/pknotify --destination $PYKOTAJOBORIGINATINGHOSTNAME:7654 --timeout 60 --notify "The billing code specified is not allowed") 
    416477# unknown_billingcode : deny(/path/to/some/script) 
    417478# unknown_billingcode : create 
     479 
     480 
    418481 
    419482# Where should we store our (temporary) files when printing ? 
     
    427490# directory : /var/spool/cups 
    428491 
     492 
     493 
    429494# Should we keep our work files on disk after printing ? 
    430495# If unset, temporary files are deleted once the work is finished. 
     
    434499# If both are defined, the printer option has priority. 
    435500# Default value is No, meaning temporary files are deleted 
     501# You should set it to yes only during installation to not 
     502# waste disk space during normal use. 
     503# 
    436504# keepfiles : yes 
    437505keepfiles : no 
    438506 
    439507 
    440 # What is the accounting backend to use 
    441 #  
    442 # supported values : 
    443 # 
    444 #    - hardware : asks the printer for its lifetime page counter 
    445 #                 via either SNMP, AppleTalk, or any external 
    446 #                 command. This method is the recommended one 
    447 #                 in PyKota since its beginning. 
    448 # 
    449 #                 In the lines below "%(printer)s" is automatically replaced 
    450 #                 at run time with your printer's Fully Qualified Domain Name 
    451 #                 for network printers, if PyKota can extract it from its  
    452 #                 environment. 
    453 #                 e.g. myprinter.example.com 
    454 # 
    455 #         Recommended values : 
    456 # 
    457 #             accounter: hardware(snmp) 
    458 # 
    459 #               Extracts the printer's internal page counter via SNMP. 
    460 # 
    461 #         Or : 
    462 # 
    463 #             accounter: hardware(pjl) 
    464 #  
    465 #               Extracts the printer's internal page counter via PJL queries over port tcp/9100. 
    466 # 
    467 #         Advanced uses : 
    468 # 
    469 #             accounter: hardware(snmp:MyCommunity) 
    470 # 
    471 #               To use a different SNMP community name than the default one (which is 'public') 
    472 # 
    473 #             accounter: hardware(pjl:9101)  
    474 # 
    475 #               To use a different port than the default one (which is 9100) 
    476 # 
    477 # 
    478 #         Other Examples :  
     508 
     509# What is the accounting backend to use : this defines the way PyKota 
     510# will compute the number of pages printed. This directive is the most 
     511# important one in PyKota's configuration. 
     512#  
     513# NB : This directive is MANDATORY, there's no default value when not set. 
     514# 
     515# Supported values : 
     516# 
     517# - software([/path/to/some/script[ --with-args]]) 
     518# - hardware(snmp[:community]|pjl[:port]|/path/to/some/script[ --with-args]) 
     519# 
     520# Hardware asks the printer for its lifetime page counter through either 
     521# SNMP, PJL-over-TCP, or through any command of your choice. This is 
     522# the recommended way to use PyKota, although it might not work with some 
     523# printers. The page counter is asked twice per job : before the job 
     524# is sent to the printer, and after it has been entirely sent. 
     525# The big advantages of hardware accounting are lighter CPU usage compared 
     526# to software accounting described below, although it can take more time 
     527# because of necessary internal counter stabilization delays, and the fact  
     528# that paper jams don't cause users to be charged for pages they couldn't 
     529# print. 
     530# For hardware accounting, two special values are accepted in addition 
     531# to a script name : snmp and pjl. 'snmp' asks PyKota to use its internal 
     532# SNMP code, 'pjl' asks PyKota to internally send a specially crafter PJL  
     533# job to the printer's TCP port 9100 (by default). 
     534# 
     535# Software counts pages by parsing the print job's datas, either internally 
     536# when no script is specified, or through any script of your choice. 
     537# This works with ALL printers, provided you've got a script to parse 
     538# datas produced by your printer driver. PyKota's internal parser, also 
     539# available under the name 'pkpgcounter', recognizes several page description 
     540# languages, but may occasionally fail for some printer drivers. 
     541# You can however use any other command, provided it can read the datas to 
     542# parse from its standard input, and prints a single integer on its standard 
     543# output, representing the number of pages in the print job. 
     544# Software accounting unfortunately may overcharge users in case of paper 
     545# jams. 
     546#  
     547# You can get hints on which configuration is best for your printers by 
     548# typing : pkturnkey --doconf 
     549# 
     550# In the lines below "%(printer)s" is automatically replaced at run time 
     551# with your printer's Fully Qualified Domain Name for network printers,  
     552# if PyKota can extract it from its environment. 
     553# 
     554# Examples : 
     555# 
     556# accounter : hardware(snmp) 
     557# accounter : hardware(snmp:private) 
     558# accounter : hardware(pjl) 
     559# accounter : hardware(pjl:9101) 
     560# accounter : hardware(/usr/share/pykota/waitprinter.sh %(printer)s && /usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ") 
     561# accounter : hardware(/usr/bin/npadmin --pagecount %(printer)s) 
     562# accounter : hardware(/usr/share/pykota/papwaitprinter.sh "MyPrinter:LaserWriter@*" && /usr/bin/pap -p "MyPrinter:LaserWriter@*" /usr/share/pykota/pagecount.ps  2>/dev/null | /bin/grep -v status | /bin/grep -v Connect | /usr/bin/tail -1) 
     563# accounter : hardware(/bin/cat /usr/share/pykota/pagecount.pjl >/dev/lp0 && /usr/bin/head -2 </dev/lp0 | /usr/bin/tail -1) 
     564# accounter : hardware(/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) 
     565# accounter : hardware(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public -Ov %(printer)s | grep Counter32 | tail -2 | head -1 | cut -d " " -f2) 
     566# accounter : software(/usr/bin/pkpgcounter)  
     567# accounter : software() 
    479568#          
    480 #             accounter: hardware(/usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ") 
     569# This directive can be set either globally or per printer or both. 
     570# If both are defined, the printer option has priority. 
    481571#          
    482 #         Another untested example, using npadmin : 
     572# IF YOU PLAN TO USE YOUR OWN SCRIPTS FOR HARDWARE ACCOUNTING,       
     573# YOU ABSOLUTELY HAVE TO BE SURE YOU HAVE A SCRIPT WHICH WAITS FOR THE 
     574# PRINTER BEING READY BEFORE ASKING FOR ITS INTERNAL PAGE COUNTER. 
    483575#          
    484 #             accounter: hardware(/usr/bin/npadmin --pagecount %(printer)s) 
     576# PYKOTA'S 'snmp' and 'pjl' HARDWARE ACCOUNTING METHODS DO THE CORRECT WORK 
     577# INTERNALLY, BUT SOME OF THE EXAMPLES ABOVE DON'T, YOU HAVE BEEN WARNED. 
     578# 
     579# WITH THE SPECIAL MAGIC hardware(snmp) AND hardware(pjl) VALUES, PYKOTA 
     580# TAKES CARE OF ALL THIS FOR YOU, SO PLEASE UNDERSTAND THAT IT IS PREFERABLE 
     581# TO USE THESE TWO METHODS : THEY WORK FINE, REQUIRE LITTLE TO NO CPU, 
     582# AND DO ALL THE HARD WORK AUTOMATICALLY. IF YOU REALLY NEED TO YOU CAN USE 
     583# YOUR OWN EXTERNAL COMMANDS AS DESCRIBED ABOVE, JUST BE CAREFUL WITH THIS. 
    485584#          
    486 #         Another example, for AppleTalk printers which works fine : 
    487 #         (You may need the pap CUPS backend installed, and copy the  
    488 #         pagecount.ps file from untested/netatalk into /etc or any  
    489 #         appropriate location) 
    490 #          
    491 #             accounter: hardware(/usr/share/pykota/papwaitprinter.sh "MyPrinter:LaserWriter@*" && /usr/bin/pap -p "MyPrinter:LaserWriter@*" /usr/share/pykota/pagecount.ps  2>/dev/null | /bin/grep -v status | /bin/grep -v Connect | /usr/bin/tail -1) 
    492 #          
    493 #         An example for parallel printers like the HP Laserjet 5MP : 
    494 #          
    495 #             accounter: hardware(/bin/cat /usr/share/pykota/pagecount.pjl >/dev/lp0 && /usr/bin/head -2 </dev/lp0 | /usr/bin/tail -1) 
    496 #          
    497 #         This value can be set either globally or per printer or both. 
    498 #         If both are defined, the printer option has priority. 
    499 #          
    500 #         Some examples and comments provided by Bob Martel from csuohio.edu 
    501 #          
    502 #         For several printers I could not get the page count using snmpget.  I 
    503 #         resorted to snmpwalk: 
    504 #          
    505 #             accounter: hardware(/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) 
    506 #          
    507 #         The last example is still more ugly, some of the printers only provided 
    508 #         their counters without names, but at least always on the same line: 
    509 #          
    510 #             accounter: hardware(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public -Ov %(printer)s | grep Counter32 | tail -2 | head -1 | cut -d " " -f2) 
    511 #          
    512 #         An example using netcat and a preformatted PJL job which you can find 
    513 #         in the untested/pjl directory, which is sent to a JetDirect print 
    514 #         server on port 9100 : 
    515 #          
    516 #             accounter: hardware(/bin/nc -w 2 %(printer)s 9100 </usr/share/pykota/pagecount.pjl | /usr/bin/tail -2) 
    517 #          
    518 #         An example using the contributed pagecount.pl script which does  
    519 #         the same as above, but should work on more printers :  
    520 #          
    521 #             accounter: hardware(LC_ALL=C /usr/share/pykota/pagecount.pl %(printer)s 9100) 
    522 #          
    523 #         NB : the LC_ALL=C is used because sometimes Perl can correctly set locale and is verbose 
    524 #              about it, causing PyKota to miss the correct answer. 
    525 # 
    526 #         WARNING : In any case, when using an hardware accounter, please test the command line outside 
    527 #                   of PyKota before. This will save you some headaches in case it doesn't work as expected. 
    528 #          
    529 #         The waitprinter.sh is there to wait until the printer is idle again. 
    530 #         This should prevent a job to be sent to the printer while another one is  
    531 #         not yet finished (not all pages are printed, but the complete job is in  
    532 #         the printer) 
    533 #          
    534 #   YOU ABSOLUTELY HAVE TO BE SURE YOU HAVE A SCRIPT WHICH WAITS FOR THE 
    535 #   PRINTER BEING READY BEFORE ASKING FOR ITS INTERNAL PAGE COUNTER. 
    536 #          
    537 #   PYKOTA INCLUDES SUCH SCRIPTS FOR SNMP AND APPLETALK PRINTERS, MORE TO COME 
    538 # 
    539 #   SOME OF THE ABOVE EXAMPLES DON'T USE SUCH A SCRIPT, YOU HAVE BEEN WARNED 
    540 # 
    541 # 
    542 #   WITH THE SPECIAL MAGIC hardware(snmp) AND hardware(pjl) VALUES, PYKOTA 
    543 #   TAKES CARE OF ALL THIS FOR YOU, SO PLEASE UNDERSTAND THAT IT IS PREFERABLE 
    544 #   TO USE THESE TWO METHODS : THEY WORK FINE, REQUIRE LITTLE TO NO CPU, 
    545 #   AND DO ALL THE HARD WORK AUTOMATICALLY. IF YOU REALLY NEED TO YOU CAN USE 
    546 #   YOUR OWN EXTERNAL COMMANDS AS DESCRIBED ABOVE, JUST BE CAREFUL WITH THIS. 
    547 #          
    548 # 
    549 #    - software : delegates the job's size computation to any  
    550 #                 external command of your choice.  
    551 # 
    552 #                 best choice for this is probably to set it 
    553 #                 this way : 
    554 # 
    555 #                   accounter: software() 
    556 # 
    557 #                 which uses pkpgcounter's code internally to compute 
    558 #                 the size of the job. 
    559 #                 NB : YOU MUST NOW INSTALL pkpgcounter FOR PyKota TO WORK. 
    560 # 
    561 #                 You could obtain exactly the same result with : 
    562 # 
    563 #                   accounter: software(/usr/bin/pkpgcounter) 
    564 # 
    565 #                 But in this case the job would be passed through 
    566 #                 pkpgcounter's parser a second time. 
    567 # 
    568 #                 pkpgcounter is a command line tool which was 
    569 #                 part of PyKota and which can handle several types 
    570 #                 of documents. It is now distributed separately. 
    571 # 
    572 #                 while pkpgcounter is the recommended value if you want 
    573 #                 to use an external command here, you can use whatever  
    574 #                 command you want provided your command accepts the job's 
    575 #                 data on its standard input and prints the job's size in  
    576 #                 pages as a single integer on its standard output. 
    577 #  
    578 # This value can be set either globally or on a per printer basis 
    579 # If both are defined, the printer option has priority. 
    580 # 
    581 # accounter: hardware(/usr/share/pykota/waitprinter.sh %(printer)s && /usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ") 
    582 # accounter: hardware(snmp) 
    583 # accounter: hardware(pjl) 
    584 # accounter: software(/usr/bin/pkpgcounter) 
    585 # 
    586 # The following, software without any argument, works since PyKota 1.21  
    587 # and uses pkpgcounter's code internally. 
     585# Sane default : 
     586# 
    588587accounter: software() 
     588 
     589 
    589590 
    590591# What is the "pre"-accounter used for precomputing the job's size. 
     
    595596#  preaccounter: software(/path/to/your/script) 
    596597# 
    597 # NB : the preaccounter directive doesn't support hardware() for obvious reasons. 
    598 # If unset, "software()" is assumed. If you use your own script, ensure that it 
    599 # only prints the job's number of pages (or an estimation of it) on its standard output. 
     598# NB : the preaccounter directive doesn't support hardware() for obvious  
     599# reasons. If unset, "software()" is assumed. If you use your own script,  
     600# ensure that it only prints the job's number of pages (or an estimation  
     601# of it) on its standard output. 
     602# 
     603# You may want to define for example 'preaccounter : software(/bin/echo 1)' 
     604# in the case your printer supports an hardware accounter but pkpgcounter 
     605# can't parse your printer driver's datas. 
    600606# 
    601607# This value can be set either globally or on a per printer basis 
    602608# If both are defined, the printer option has priority. 
    603609# 
     610# Sane default : 
     611# 
    604612preaccounter: software() 
     613 
    605614 
    606615 
     
    629638onaccountererror: stop 
    630639 
     640 
     641 
    631642# Print Quota administrator 
    632643# These values can be set either globally or per printer or both. 
     
    637648adminmail: root@localhost 
    638649 
    639 # 
     650 
     651 
    640652# Who should we send an email to in case a quota is reached ? 
    641653# possible values are : DevNull, User, Admin, Both, External(some command) 
     
    660672#                               to use it. 
    661673# 
    662 #   On your command line, to pass arguments to your command. 
    663 #   Example : 
    664 # 
    665 #       mailto: external(/usr/bin/callpager %(username)s "Quota problem on %(printername)s" >/dev/null) 
     674#   on your command line, to pass arguments to your command. 
     675#   Examples : 
     676# 
     677#     mailto: external(/usr/bin/callpager %(username)s "Quota problem on %(printername)s" >/dev/null) 
    666678# 
    667679#   To automatically send a WinPopup message (this may only work with a PDC,  
    668680#   here the same machine does Samba as PDC + CUPS) : 
    669681# 
    670 #       mailto: external(echo "%(message)s" | /usr/bin/iconv --to-code utf-8 --from-code iso-8859-15 | /usr/bin/smbclient -M "%(username)s" 2>&1 >/dev/null) 
     682#     mailto: external(echo "%(message)s" | /usr/bin/iconv --to-code utf-8 --from-code iso-8859-15 | /usr/bin/smbclient -M "%(username)s" 2>&1 >/dev/null) 
    671683# 
    672684#   NB : I use ISO-8859-15, but Windows expects UTF-8, so we pipe the message 
     
    675687# or more simply : 
    676688# 
    677 #       mailto: external(/usr/share/pykota/mailandpopup.sh %(username)s %(printername)s "%(email)s" "%(message)s" 2>&1 >/dev/null) 
     689#     mailto: external(/usr/share/pykota/mailandpopup.sh %(username)s %(printername)s "%(email)s" "%(message)s" 2>&1 >/dev/null) 
    678690# 
    679691#   NB : The mailandpopup.sh shell script is now included in PyKota 
     
    683695#        underlying layer (filter or backend) 
    684696# 
    685 mailto: both 
    686  
    687 # 
    688 # Grace delay in days 
    689 # This value can be set either globally or per printer or both. 
    690 # If both are defined, the printer option has priority. 
    691 # If the value is not set then the default seven (7) days applies. 
    692 gracedelay: 7 
    693  
    694 # 
    695 # Poor man's threshold 
    696 # If account balance reaches below this amount, 
    697 # a warning message is sent by email 
    698 # 
    699 # If unset, default poor man's threshold is 1.0. 
    700 # This option can only appear in the global section 
    701 poorman: 2.0 
     697mailto : both 
     698 
     699 
    702700 
    703701# The value of the zero for account balance limitations. 
     
    706704# the default value is 0. Any floating point value 
    707705# is accepted. 
     706# You'll want to use this to give free credits to your users 
     707# at the start of the year for example. 
    708708# 
    709709# This option can only appear in the global section 
     710# 
    710711# balancezero : -0.25 
     712# 
    711713balancezero: 0.0 
     714 
     715 
     716 
     717# Grace delay in days 
     718# This value can be set either globally or per printer or both. 
     719# If both are defined, the printer option has priority. 
     720# If the value is not set then the default seven (7) days applies. 
     721# 
     722gracedelay : 7 
     723 
     724 
     725 
     726# Poor man's threshold 
     727# If account balance reaches below this amount, a warning message  
     728# is sent through the 'mailto' directive above. 
     729# 
     730# If unset, default poor man's threshold is 1.0. 
     731# This option can only appear in the global section 
     732# 
     733poorman : 1.0 
     734 
     735 
    712736 
    713737# Poor man's warning message 
    714738# The warning message that is sent if the "poorman" value is reached 
    715739# Again this must appear in the global section 
    716 poorwarn: Your Print Quota account balance is low.  
     740# 
     741poorwarn : Your Print Quota account balance is low.  
    717742 Soon you'll not be allowed to print anymore. 
     743 
     744 
    718745 
    719746# Soft limit reached warning message 
    720747# The warning message that is sent if the soft quota limit is reached 
    721748# May appear either globally or on a per-printer basis 
     749# 
    722750softwarn: Your Print Quota Soft Limit is reached. 
    723751 This means that you may still be allowed to print for some 
    724752 time, but you must contact your administrator to purchase  
    725753 more print quota. 
    726   
     754 
     755 
     756 
    727757# Hard limit reached error message 
    728758# The error message that is sent if the hard quota limit is reached 
    729759# May appear either globally or on a per-printer basis 
     760# 
    730761hardwarn: Your Print Quota Hard Limit is reached. 
    731762 This means that you are not allowed to print anymore. 
     
    733764 as soon as possible to solve the problem. 
    734765 
    735 # one section per printer, or no other section at all if all options  
    736 # are defined globally. 
    737 # Each section's name must be the same as the printer's queue name as defined 
    738 # in your printing system, be it CUPS or LPRng, between square brackets, for 
    739 # example a print queue named 'hpmarketing' would appear in this file as 
    740 # [hpmarketing] 
    741766 
    742767 
     
    755780# 
    756781# external policy can be used to launch any external command of your choice, 
    757 # for example to automatically add the user to the quota storage  
    758 # if he is unknown. Example : 
    759 #  
    760 #   policy: external(/usr/bin/edpykota --add --printer %(printername)s --softlimit 50 --hardlimit 60 %(username)s >/dev/null)  
     782# for example to automatically add the user to the quota database, and set 
     783# page limits on the current printer if he is unknown : 
     784#  
     785#   policy: external(/usr/bin/pkusers --add --skipexisting %(username)s && /usr/bin/edpykota --add --skipexisting --printer %(printername)s --softlimit 50 --hardlimit 60 %(username)s)  
    761786# 
    762787# NB : If you want to limit users by their account balance value, it is preferable to 
    763788# use the following policy to automate user account creation on first print : 
    764789# 
    765 #   policy: external(/usr/bin/autopykota --initbalance 25.0 >/dev/null)  
     790#   policy: external(/usr/bin/autopykota --initbalance 25.0)  
    766791# 
    767792#   This will automatically add the user if he doesn't already exist, and 
     
    774799# Of course you can launch any command of your choice with this, e.g. : 
    775800# 
    776 #   policy: external(/usr/local/bin/myadminscript.sh %(username)s >/dev/null) 
     801#   policy: external(/usr/local/bin/myadminscript.sh %(username)s) 
    777802 
    778803# You can use : 
     
    782807# 
    783808#   On your command line, to pass arguments to your command.  
    784 # 
    785 #   NB : Don't forget to redirect your command's standard output somewhere  
    786 #        (e.g. >/dev/null) so that there's no perturbation to the underlying 
    787 #        layer (filter or backend) 
    788809# 
    789810# If the printer, user, or user quota entry still doesn't exist after  
     
    792813# command, then the job is rejected. 
    793814# 
     815# By default, we reject all jobs from users not in the database : 
     816# 
    794817policy: deny 
     818 
     819 
    795820 
    796821# Pre and Post Hooks  
     
    865890# prehook: /usr/bin/printenv >/tmp/before 
    866891 
     892 
     893 
    867894# PostHook : gets executed after the job has been added to the history. 
    868895# posthook has access to all the environment variables defined above, 
     
    874901# posthook: /usr/bin/printenv >/tmp/after 
    875902 
     903 
     904 
    876905# AccountBanner : how should banner accounting be done ? 
    877906# 
    878 # NB : CUPS ONLY FOR NOW ! 
    879 #  
    880907# If enabled, banner pages printed from StartingBanner and/or EndingBanner  
    881908# (depending on the value) will be included in the accounting for the 
     
    898925# accountbanner: Both 
    899926 
     927 
     928 
    900929# Maximal number of times the banner will still be printed if 
    901930# the user is forbidden to print. 
    902931# 
    903 # NB : CUPS ONLY FOR NOW ! 
    904 #  
    905932# This option can be set either globally or on a per printer basis. 
    906933# Allowed values are 0 or any positive integer. 
    907934# Default value is 0, which means that the banner won't be printed 
    908935# at all if the user is forbidden to print. 
     936# 
    909937maxdenybanners: 0 
     938 
     939 
    910940 
    911941# StartingBanner : if defined will print a banner before the rest of the job  
    912942# is printed. The argument can be a printable file, or an executable file. 
    913943# If not executable, the file will be printed as is. If executable, the  
    914 # file will be executed and its output will be printed. 
    915 # 
    916 # NB : CUPS ONLY FOR NOW ! 
    917 #  
     944# file will be executed and its standard output will be sent to the printer. 
     945# 
    918946# In any case, the banner content which will be sent to the printer 
    919947# MUST be in a format your printer will accept !!!  
     
    930958# startingbanner: /usr/bin/pkbanner 
    931959 
     960 
     961 
    932962# EndingBanner : if defined will print a banner after the job  
    933963# has been printed. The argument can be a printable file, or an executable file. 
    934964# If not executable, the file will be printed as is. If executable, the  
    935 # file will be executed and its output will be printed. 
    936 # 
    937 # NB : CUPS ONLY FOR NOW ! 
     965# file will be executed and its standard output will be sent to the printer. 
    938966# 
    939967# In any case, the banner content which will be sent to the printer 
     
    963991# endingbanner: /usr/bin/pkbanner  
    964992 
     993 
     994 
    965995# How should enforcement be done for this printer ? 
    966996# 
     
    9761006# valid values : "strict" or "laxist" 
    9771007# 
    978 # default value 
     1008# default value when not set is "laxist" 
     1009# 
    9791010# enforcement : laxist 
    9801011enforcement : strict 
    9811012 
     1013 
     1014 
    9821015# Should we trust the job size on this printer ? 
    9831016# 
     
    9851018# by the hardware or by software is trusted. 
    9861019# 
    987 # "trustjobsize : >N:precomputed" : uses the precomputed value if jobsize > N pages 
     1020# "trustjobsize : >N:precomputed" : uses the precomputed value 
     1021#                                   if jobsize > N pages 
    9881022# "trustjobsize : >N:25" : uses 25 if jobsize is >N pages 
    9891023# 
     
    10031037# AND THE JOB SIZE AS COMPUTED BY PYKOTA EITHER USING HARDWARE OR 
    10041038# SOFTWARE. 
     1039# 
    10051040trustjobsize : yes 
     1041 
     1042 
    10061043 
    10071044# Should we deny duplicate jobs ? 
     
    10321069denyduplicates : no 
    10331070 
     1071 
     1072 
    10341073# Sets the delay in seconds after which two identical jobs are  
    10351074# not considered as being a duplicate. 
     
    10401079duplicatesdelay : 0 
    10411080 
     1081 
     1082 
  • pykota/trunk/conf/pykotadmin.conf.sample

    r2819 r2837  
    1111#     Contains configuration directives to specify the username and 
    1212#     optional password for the PyKota's database administrator. 
    13 #     This user is either a PostgreSQL user, or an LDAP dn. 
     13#     This user is either a PostgreSQL or MySQL user, or an LDAP complete dn. 
     14#     For SQLite, only the [global] section itself is required, but 
     15#     the rest of the file can be empty. 
    1416# 
    1517# Directives format :