How to get print file name from samba?

Joel Hammer Joel at HammersHome.com
Wed Nov 21 06:07:04 GMT 2001


In your printer share:
%s is the print file name after it is transferred to samba.
preexec = myprogram %s;myprogram2;myprogram3 will run any program[s] you want on the file.
preexec close = Yes  <--- This parameter will abort the service if you
return anything but a 0 (eg. exit 1) from your script or program run with the
preexec parameter.
I don't recall just now if it will let the postexec command run or
not.
I don't think you can scan the file BEFORE samba saves it. But, would that
be a problem? You can just remove the file with the preexec commands if it
fails the virus check, or save it to a special virus directory.
Now, there is a veto files parameter,  which rejects some files by their name.
I assume that works before they are saved. Don't know for sure.
Joel

On Wed, Nov 21, 2001 at 07:52:51PM +0800, timmy tang wrote:
> Hello guys,
> 
> Is there any way I can get the print file name from samba when I send a print job to a print share from MS windows? Is there any variable to do so? 
> Is there any way to run programs before samba actually save the file? This is because I would like to run virus checker before actually saving files to samba.
> 
> Thanks for help!
> 
> Timmy




More information about the samba mailing list