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 ...)
For everything to work as announced, you need to have three things:
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.