[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: procmail'ing for vbs attachments was Re: [cobalt-users] Babysitting



----- Original Message -----
From: "Rik Thomas" <rikt@xxxxxxxxxxxx>
To: "Dan" <dan@xxxxxxxxxxxxx>
Cc: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Tuesday, 9 May 2000 00:59
Subject: procmail'ing for vbs attachments was Re: [cobalt-users] Babysitting

> What has worked for us is creating a /etc/procmailrc and having this
> content:
>
> SHELL=/bin/bash
> :0 B
> * ^Content-Disposition: attachment;
> * filename=".*\.vbs"
> {
>     :0 fbw
>     |/bin/sed -e 's/\(name=".*\.vbs\)"/\1.txt"/'
>
>     :0 c
>     /var/log/love.txt
> }
>
> What this does is any attachment with a vbs extension gets renamed to
> filename.vbs.txt so if the user doubleclicks on the attachment it will
> bring it up in their registered text editor.
>
> The second section copies the email to a log file for administor
> reference.
>
> What is nice about this is that no email gets lost in the void and you
> aren't lamely filtering on the subject or the body which none is truly
> failsafe against all of the variants out there.
>

This looks like a very good idea.  But, I have two or three questions:

1) Is there a way of notifying the recipient that this has been done to that
particular mail item - either by tacking something onto the beginning (or
end), or by adding another attachment, or with another mail item (less
preferably, because it will not necessarily be kept near the original,
depending on client sorting)?

2) Can a converted copy also be sent to "admin" or some other mailbox, say
"virusalert"?  I fear that /var/log/love.txt might become very large if the
server is being bombarded, as would the mailbox I've just asked about.

3) What permissions and ownership should be given to /etc/procmailrc?
(reiterating Dom Latter's question)

Rob E.