[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell
Bruce Smith wrote:
> > All the files that should be "typed" are in that directory
> Are you SURE you really want to use the command "type"?
No I am not...
> Maybe you want the command "file" instead?
Yes. Somehow I overlooked completely that I was using the wrong command...
With 'file' al works fine.
> I don't know exactly what you're trying to do, but I
> really don't think "type" is the command you want.
Purpose is the 'catch' renamed attachments in mail. A lot of mail is passing the mail server that contains numerous more or less
funny attachments. The script, as it functions now, uses two configuration files: one stating the extensions of attachments to catch
and a allow-file that describes files and users allowed to pass.
Most of the popular attachments such as .exe .shs .com .vbs are listed in the atts-config file. (We detected the anna-kournicova
virus this way even before it was know to spread.) Once an 'illegal' attachment is found a message to the postmaster (me) is
generated. Via a forward command the message can still be delivered if needed. By the allow file I can let messages pass this filter
(It still goes through the virus scanner). I just have to know the sender and the name of the attachment(s). This is convenient
because a lot of partners of the company are mailing attachments on a regularly basis that carry updates that end in .exe and I
don't want to have to forward them by hand.
No problem one could say. Wrong. Some of the colleagues needed very short time to find out that renaming a attachment into something
like"very-funny.unknown" would let it pass the filter. What started as a filter to catch not wanted attachments has now got into a
who-is-the-smartest contest between me and some of my colleagues. Although I realize that those attachments received this way are
most likely not harmful in the sense of viruses. I still want to win that contest. I want to send them a mail when a renamed
attachment has been found. Something like "I found your rename attachment, please try again". Nice side effect is that the network
stays free of a lot of rubbish.
Already I added patterns to the magic file to get into all the .com types. And most of the test scrips worked. Until I did put it
all together and wrote type instead of file... The rest you know.
Thanks again.
Bert
>
> --------------------------------------------
> Bruce Smith bruce@armintl.com
> System Administrator / Network Administrator
> Armstrong International, Inc.
> Three Rivers, Michigan 49093 USA
> http://www.armstrong-intl.com/
> --------------------------------------------