procmail
[Top] [All Lists]

Help with recipe

2002-04-30 19:26:46
Greetings:

I attempt to intercept and rename all *.exe attachments for my customers.
Lately, I've seen a bunch make it through.

Can someone spot why this:

<snip>
--J905Gq8mvU59D0418M6
Content-Type: application/octet-stream;
 name=demo.exe
Content-Transfer-Encoding: base64
Content-ID: <IAy9XLH8JQ5i5X83a>
<snip>

Isn't caught by this recipe:

:0
*^Content-type:
(multipart/mixed|application/octet-stream|audio/x-wav|image/gif)
{
        :0 HB
        * ^Content-Disposition: (attachment|inline);
        * ^.*name=.*\.(vbs|wsf|shs|exe|chm|vbe|hta|bat|com)
        {
                SHELL=/bin/sh
                :0 fhbw
                |/bin/sed \
- -e 's/\([nN][aA][mM][eE]=".*\.[vV][bB][sS]\)"/\1.warn"/' \
- -e 's/\([nN][aA][mM][eE]=".*\.[wW][sS][fF]\)"/\1.warn"/' \
- -e 's/\([nN][aA][mM][eE]=".*\.[sS][hH][sS]\)"/\1.warn"/' \
- -e 's/\([nN][aA][mM][eE]=".*\.[eE][xX][eE]\)"/\1.warn"/' \
- -e 's/\([nN][aA][mM][eE]=.*\.[eE][xX][eE]\)/\1.warn/' \
- -e 's/\([nN][aA][mM][eE]=".*\.[cC][hH][mM]\)"/\1.warn"/' \
- -e 's/\([nN][aA][mM][eE]=".*\.[vV][bB][eE]\)"/\1.warn"/' \
- -e 's/\([nN][aA][mM][eE]=".*\.[hH][tT][aA]\)"/\1.warn"/' \
- -e 's/\([nN][aA][mM][eE]=".*\.[bB][aA][tT]\)"/\1.warn"/' \
- -e 's/\([nN][aA][mM][eE]=".*\.[cC][oO][mM]\)"/\1.warn"/' \
- -e
's/^[Ss][Uu][Bb][Jj][Ee][Cc][Tt]:/Subject:DANGER:VirusMayBeAttached-NameChan
ged: /'
        :0 c
        $ADJUSTED
       }
}


Are the two conditions under :0 HB AND'ed or OR'ed?  (e.g. Content and name)
Is that my problem?

Thanks very much for the time to help.





_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail