[Samba] print command, but then for shares

Wouter Verhelst wouterv at isw.be
Mon Mar 25 07:10:05 GMT 2002


Hi

Using the "print command" configuration parameter for print shares and a 
self-written script, I have been able to set up a fake printer which 
generates a PDF file from printed data, mailing the result to the user. 
It works wonderfully.

I'd like to do something similar with a virusscanner and a file share; 
The idea is that whenever someone puts a file in this share, the 
virusscanner is invoked and a scanreport is mailed to the user. I've got 
one problem, though: AFAIK there is no option for file shares that works 
the same way as the "print command" does for print shares; and although 
I could theoretically set up a cronjob that periodically checks a 
directory and performs its tasks on the files in that directory, it 
would be easier if I could invoke that script from the smb.conf file (so 
that I don't have to worry that much about lockfiles, finding out 
usernames and similar things). Or am I missing something? If so, could 
someone point me in the right direction?

For reference, the system is an OpenBSD with samba 2.0. I'd prefer not 
to upgrade to 2.2, but if that's the only way to achieve this goal, so 
be it.

TIA,

Wouter Verhelst






More information about the samba mailing list