Well, my script will be specified an external scanner module called by a mail sanitizer in the case of compressed mail attachments.
So far I thought that the mail sanitizer passes the attachments to the standard input of such external scanner modules.
Now I rather think it saves the attachments to a temporary location and only passes the filename to the external modules.
If it is so, it is better, since I can then obtain the filename in $1, besides, e.g. unzip did not seem very eager to accept data to be uncompressed on its standard input...