18.16 Auto-Deletion or Preservation of CUPS Spool Files


Samba print files pass through two spool directories. One is the incoming directory managed by Samba, (set in the path = /var/spool/samba directive in the [printers] section of smb.conf ). The other is the spool directory of your UNIX print subsystem. For CUPS it is normally /var/spool/cups/ , as set by the cupsd.conf directive RequestRoot /var/ spool/cups .

18.16.1 CUPS Configuration Settings Explained

Some important parameter settings in the CUPS configuration file cupsd.conf are:

PreserveJobHistory Yes ” This keeps some details of jobs in cupsd's mind (well it keeps the c12345, c12346, and so on, files in the CUPS spool directory, which do a similar job as the old-fashioned BSD-LPD control files). This is set to " Yes " as a default.

PreserveJobFiles Yes ” This keeps the job files themselves in cupsd's mind (it keeps the d12345, d12346 etc. files in the CUPS spool directory). This is set to " No " as the CUPS default.

"MaxJobs 500 " ” This directive controls the maximum number of jobs that are kept in memory. Once the number of jobs reaches the limit, the oldest completed job is automatically purged from the system to make room for the new one. If all of the known jobs are still pending or active, then the new job will be rejected. Setting the maximum to 0 disables this functionality. The default setting is 0.

(There are also additional settings for MaxJobsPerUser and MaxJobsPerPrinter ...)

18.16.2 Pre-Conditions

For everything to work as announced, you need to have three things:

  • A Samba-smbd that is compiled against libcups (check on Linux by running ldd 'which smbd' ).

  • A Samba -smb.conf setting of printing = cups.

  • Another Samba -smb.conf setting of printcap = cups.

N OTE

graphics/round_pencil.gif

In this case, all other manually set printing- related commands (like print command , lpq command , lprm command , lppause command or lpresume command ) are ignored and they should normally have no influence whatsoever on your printing.


18.16.3 Manual Configuration

If you want to do things manually, replace the printing = cups by printing = bsd. Then your manually set commands may work (I haven't tested this), and a print command = lp -d %P %s; rm %s" may do what you need.



Official Samba-3 HOWTO and Reference Guide
The Official Samba-3 HOWTO and Reference Guide, 2nd Edition
ISBN: 0131882228
EAN: 2147483647
Year: 2005
Pages: 297

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net