Changeset 2837
- Timestamp:
- 04/06/06 23:39:23 (19 years ago)
- Location:
- pykota/trunk/conf
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/conf/pykota.conf.sample
r2819 r2837 46 46 # 47 47 48 49 # 50 # All directives must be placed below the following line 48 51 [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 54 54 55 55 #################################################################### … … 59 59 #storagebackend : sqlitestorage 60 60 #storagename: /etc/pykota/pykota.db 61 62 #################################################################### 63 64 61 65 62 66 ############################################################################ … … 86 90 # In the line below change the password's value if needed. 87 91 storageuserpw : readonlypw 92 93 ############################################################################ 94 95 88 96 89 97 #################################################################### … … 159 167 # 160 168 # LDAP attribute which stores the user's email address 169 # 161 170 #usermail : mail 162 171 … … 164 173 # Choose what attribute contains the list of group members 165 174 # common values are : memberUid, uniqueMember, member 175 # 166 176 #groupmembers: memberUid 167 177 … … 175 185 # BEWARE : SETTING THIS TO 'YES' CAUSES PROBLEMS FOR NOW 176 186 # BETTER TO LET IT SET TO 'NO' 187 # 177 188 # ldapcache: no 178 189 190 #################################################################### 191 179 192 ############################################################# 180 # ALL directives below are common to ALL storage backends#193 # END of database specific directives # 181 194 ############################################################# 195 196 182 197 183 198 # Should the database caching mechanism be enabled or not ? … … 197 212 # 198 213 storagecaching: No 214 215 199 216 200 217 # Should full job history be disabled ? … … 204 221 # Disabling the job history with a relationnal backend works too 205 222 # but it's probably less useful than with LDAP. 223 # 206 224 disablehistory: No 207 225 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 # 211 232 logger: system 233 234 212 235 213 236 # Enable debugging ? Put YES or NO there. … … 221 244 # so the impact per job is really minimal. Note however that this will 222 245 # add up over a large number of jobs. 246 # 223 247 debug : Yes 224 248 225 # 249 250 226 251 # The URL to PyKota's logo when used from the CGI scripts. 227 252 # You can use your own logo by modifying the URL below. 228 253 # If not defined, the default URL is the same as the 229 # one defined below 254 # one defined below : 255 # 230 256 logourl : http://www.librelogiciel.com/software/PyKota/pykota.png 231 257 232 # 258 259 233 260 # The destination to which the web browser will be redirected 234 261 # when you click on the logo defined above. 235 262 # If not defined, the default URL is the same as the 236 # one defined below 263 # one defined below : 264 # 237 265 logolink : http://www.librelogiciel.com/software/ 238 266 239 # 267 268 240 269 # Mail server to use to warn users 241 270 # If the value is not set then localhost is used. 271 # 242 272 smtpserver: localhost 273 274 243 275 244 276 # Crash messages' recipient : in addition to the log files 245 277 # each software crash can be sent to the author of PyKota 246 278 # or any other person of your choice. By default this 247 # is disabled . The recipient pykotacrashed@librelogiciel.com248 # reaches PyKota's author.279 # is disabled for privacy concerns (see below). The address 280 # pykotacrashed@librelogiciel.com reaches PyKota's author. 249 281 # The 'adminmail' (defined a bit below) is CCed. 250 282 # … … 255 287 # - a copy of the software's environment variables 256 288 # 257 # suggested value 289 # suggested value : 290 # 258 291 # crashrecipient: pykotacrashed@librelogiciel.com 292 293 259 294 260 295 # Email domain … … 268 303 # 269 304 # Set the appropriate value below, example.com set as per RFC2606. 305 # 270 306 maildomain: example.com 307 308 271 309 272 310 # Should we force usernames to be all lowercase when printing ? 273 311 # Default is No. 274 # This is a globaloption only.312 # This is a [global] option only. 275 313 # Some people reported that WinXP sends mixed case usernames 276 314 # setting 'utolower: Yes' solves the problem. … … 286 324 # is done, this means that users 'Jerome' and 'jerome' are 287 325 # different. Printer and groups names are ALWAYS case sensitive. 326 # 288 327 utolower: No 328 329 289 330 290 331 # Should we split usernames on a specific separator when printing ? 291 332 # Default is No, i.e. if the value is unset. 292 # This is a globaloption only.333 # This is a [global] option only. 293 334 # This option adds support for Samba's Winbind utility, which 294 335 # prefixes usernames with domain name and separator character. … … 304 345 # of the 'utolower' directive), this means that users 'DOMAIN1/jerome', 305 346 # 'Domain2/jerome' and 'jerome' are different. 347 # 306 348 # winbind_separator: / 349 350 307 351 308 352 # When creating users or groups accounts, should we reject users … … 316 360 # 317 361 # reject_unknown: No 362 363 318 364 319 365 # Do we want to hide jobs' title, filename and options for privacy … … 325 371 # This option can't be set on a per printer basis, only into the 326 372 # [global] section. 373 # 327 374 privacy : no 375 376 328 377 329 378 # When the real CUPS backend fail, should we modify the … … 351 400 # This value can be set either globally or on a per printer basis 352 401 # If both are defined, the printer option has priority. 402 # 353 403 # onbackenderror : charge,retry:5:60 354 404 # onbackenderror : retry:0:300 … … 356 406 # onbackenderror : charge 357 407 onbackenderror : nocharge 408 409 358 410 359 411 # Should we strip off some characters from the beginning of … … 366 418 # This value can be set either globally or on a per printer basis 367 419 # If both are defined, the printer option has priority. 420 # 368 421 # striptitle : smbprn.?????? 422 423 369 424 370 425 # Should we launch a command to overwrite the job's ticket ? … … 395 450 # If both are defined, the printer option has priority. 396 451 # 452 # examples : 453 # 454 # overwrite_jobticket : /usr/bin/pknotify --destination $PYKOTAJOBORIGINATINGHOSTNAME:7654 --timeout 180 --denyafter 3 --checkauth --ask "Username:username:$PYKOTAUSERNAME" "Password:password:" 397 455 # overwrite_jobticket : /path/to/some/script/or/command 456 457 398 458 399 459 # What should we do when we print and the billing code used is … … 414 474 # 415 475 # unknown_billingcode : deny 476 # unknown_billingcode : deny(/usr/bin/pknotify --destination $PYKOTAJOBORIGINATINGHOSTNAME:7654 --timeout 60 --notify "The billing code specified is not allowed") 416 477 # unknown_billingcode : deny(/path/to/some/script) 417 478 # unknown_billingcode : create 479 480 418 481 419 482 # Where should we store our (temporary) files when printing ? … … 427 490 # directory : /var/spool/cups 428 491 492 493 429 494 # Should we keep our work files on disk after printing ? 430 495 # If unset, temporary files are deleted once the work is finished. … … 434 499 # If both are defined, the printer option has priority. 435 500 # 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 # 436 504 # keepfiles : yes 437 505 keepfiles : no 438 506 439 507 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() 479 568 # 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. 481 571 # 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. 483 575 # 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. 485 584 # 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 # 588 587 accounter: software() 588 589 589 590 590 591 # What is the "pre"-accounter used for precomputing the job's size. … … 595 596 # preaccounter: software(/path/to/your/script) 596 597 # 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. 600 606 # 601 607 # This value can be set either globally or on a per printer basis 602 608 # If both are defined, the printer option has priority. 603 609 # 610 # Sane default : 611 # 604 612 preaccounter: software() 613 605 614 606 615 … … 629 638 onaccountererror: stop 630 639 640 641 631 642 # Print Quota administrator 632 643 # These values can be set either globally or per printer or both. … … 637 648 adminmail: root@localhost 638 649 639 # 650 651 640 652 # Who should we send an email to in case a quota is reached ? 641 653 # possible values are : DevNull, User, Admin, Both, External(some command) … … 660 672 # to use it. 661 673 # 662 # On your command line, to pass arguments to your command.663 # Example :664 # 665 # 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) 666 678 # 667 679 # To automatically send a WinPopup message (this may only work with a PDC, 668 680 # here the same machine does Samba as PDC + CUPS) : 669 681 # 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) 671 683 # 672 684 # NB : I use ISO-8859-15, but Windows expects UTF-8, so we pipe the message … … 675 687 # or more simply : 676 688 # 677 # 689 # mailto: external(/usr/share/pykota/mailandpopup.sh %(username)s %(printername)s "%(email)s" "%(message)s" 2>&1 >/dev/null) 678 690 # 679 691 # NB : The mailandpopup.sh shell script is now included in PyKota … … 683 695 # underlying layer (filter or backend) 684 696 # 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 697 mailto : both 698 699 702 700 703 701 # The value of the zero for account balance limitations. … … 706 704 # the default value is 0. Any floating point value 707 705 # 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. 708 708 # 709 709 # This option can only appear in the global section 710 # 710 711 # balancezero : -0.25 712 # 711 713 balancezero: 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 # 722 gracedelay : 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 # 733 poorman : 1.0 734 735 712 736 713 737 # Poor man's warning message 714 738 # The warning message that is sent if the "poorman" value is reached 715 739 # Again this must appear in the global section 716 poorwarn: Your Print Quota account balance is low. 740 # 741 poorwarn : Your Print Quota account balance is low. 717 742 Soon you'll not be allowed to print anymore. 743 744 718 745 719 746 # Soft limit reached warning message 720 747 # The warning message that is sent if the soft quota limit is reached 721 748 # May appear either globally or on a per-printer basis 749 # 722 750 softwarn: Your Print Quota Soft Limit is reached. 723 751 This means that you may still be allowed to print for some 724 752 time, but you must contact your administrator to purchase 725 753 more print quota. 726 754 755 756 727 757 # Hard limit reached error message 728 758 # The error message that is sent if the hard quota limit is reached 729 759 # May appear either globally or on a per-printer basis 760 # 730 761 hardwarn: Your Print Quota Hard Limit is reached. 731 762 This means that you are not allowed to print anymore. … … 733 764 as soon as possible to solve the problem. 734 765 735 # one section per printer, or no other section at all if all options736 # are defined globally.737 # Each section's name must be the same as the printer's queue name as defined738 # in your printing system, be it CUPS or LPRng, between square brackets, for739 # example a print queue named 'hpmarketing' would appear in this file as740 # [hpmarketing]741 766 742 767 … … 755 780 # 756 781 # external policy can be used to launch any external command of your choice, 757 # for example to automatically add the user to the quota storage758 # 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) 761 786 # 762 787 # NB : If you want to limit users by their account balance value, it is preferable to 763 788 # use the following policy to automate user account creation on first print : 764 789 # 765 # policy: external(/usr/bin/autopykota --initbalance 25.0 >/dev/null)790 # policy: external(/usr/bin/autopykota --initbalance 25.0) 766 791 # 767 792 # This will automatically add the user if he doesn't already exist, and … … 774 799 # Of course you can launch any command of your choice with this, e.g. : 775 800 # 776 # policy: external(/usr/local/bin/myadminscript.sh %(username)s >/dev/null)801 # policy: external(/usr/local/bin/myadminscript.sh %(username)s) 777 802 778 803 # You can use : … … 782 807 # 783 808 # On your command line, to pass arguments to your command. 784 #785 # NB : Don't forget to redirect your command's standard output somewhere786 # (e.g. >/dev/null) so that there's no perturbation to the underlying787 # layer (filter or backend)788 809 # 789 810 # If the printer, user, or user quota entry still doesn't exist after … … 792 813 # command, then the job is rejected. 793 814 # 815 # By default, we reject all jobs from users not in the database : 816 # 794 817 policy: deny 818 819 795 820 796 821 # Pre and Post Hooks … … 865 890 # prehook: /usr/bin/printenv >/tmp/before 866 891 892 893 867 894 # PostHook : gets executed after the job has been added to the history. 868 895 # posthook has access to all the environment variables defined above, … … 874 901 # posthook: /usr/bin/printenv >/tmp/after 875 902 903 904 876 905 # AccountBanner : how should banner accounting be done ? 877 906 # 878 # NB : CUPS ONLY FOR NOW !879 #880 907 # If enabled, banner pages printed from StartingBanner and/or EndingBanner 881 908 # (depending on the value) will be included in the accounting for the … … 898 925 # accountbanner: Both 899 926 927 928 900 929 # Maximal number of times the banner will still be printed if 901 930 # the user is forbidden to print. 902 931 # 903 # NB : CUPS ONLY FOR NOW !904 #905 932 # This option can be set either globally or on a per printer basis. 906 933 # Allowed values are 0 or any positive integer. 907 934 # Default value is 0, which means that the banner won't be printed 908 935 # at all if the user is forbidden to print. 936 # 909 937 maxdenybanners: 0 938 939 910 940 911 941 # StartingBanner : if defined will print a banner before the rest of the job 912 942 # is printed. The argument can be a printable file, or an executable file. 913 943 # 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 # 918 946 # In any case, the banner content which will be sent to the printer 919 947 # MUST be in a format your printer will accept !!! … … 930 958 # startingbanner: /usr/bin/pkbanner 931 959 960 961 932 962 # EndingBanner : if defined will print a banner after the job 933 963 # has been printed. The argument can be a printable file, or an executable file. 934 964 # 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. 938 966 # 939 967 # In any case, the banner content which will be sent to the printer … … 963 991 # endingbanner: /usr/bin/pkbanner 964 992 993 994 965 995 # How should enforcement be done for this printer ? 966 996 # … … 976 1006 # valid values : "strict" or "laxist" 977 1007 # 978 # default value 1008 # default value when not set is "laxist" 1009 # 979 1010 # enforcement : laxist 980 1011 enforcement : strict 981 1012 1013 1014 982 1015 # Should we trust the job size on this printer ? 983 1016 # … … 985 1018 # by the hardware or by software is trusted. 986 1019 # 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 988 1022 # "trustjobsize : >N:25" : uses 25 if jobsize is >N pages 989 1023 # … … 1003 1037 # AND THE JOB SIZE AS COMPUTED BY PYKOTA EITHER USING HARDWARE OR 1004 1038 # SOFTWARE. 1039 # 1005 1040 trustjobsize : yes 1041 1042 1006 1043 1007 1044 # Should we deny duplicate jobs ? … … 1032 1069 denyduplicates : no 1033 1070 1071 1072 1034 1073 # Sets the delay in seconds after which two identical jobs are 1035 1074 # not considered as being a duplicate. … … 1040 1079 duplicatesdelay : 0 1041 1080 1081 1082 -
pykota/trunk/conf/pykotadmin.conf.sample
r2819 r2837 11 11 # Contains configuration directives to specify the username and 12 12 # 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. 14 16 # 15 17 # Directives format :