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

Re: [cobalt-users] Bouncing Email's with Attachements W32.Sircam.Worm@mm



At 09:39 PM 08/04/01 +0000, you wrote:
>>#################################################################
>>#This stops a bunch of bad news attachements from coming through
>>#attachments are defined in the "filename" variable
>>#how to deal with them is laboriously described below
>>
>>:0
>>*^Content-type: (multipart/mixed|application/octet-stream)
>>{
>>    :0 HB
>>    *^Content-Disposition: (attachment|inline);
>>    *filename=".*\.(vbs|wsf|eml|shs|exe|nws|chm|pif|vbe|hta|scr)"
>>    {
>>       SHELL=/bin/bash
>>       :0 fhbw
>>       |/bin/sed -e \
>>'s/\([nN][aA][mM][eE]=".*\.[vV][bB][sS]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mM][eE]=".*\.[wW][sS][fF]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mN][eE]=".*\.[eE][mM][lL]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mN][eE]=".*\.[nN][wW][sS]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mM][eE]=".*\.[sS][hH][sS]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mM][eE]=".*\.[eE][xX][eE]\)"/\1.not"/' \
>>                     -e \
>>'s/\([nN][aA][mM][eE]=".*\.[cC][hH][mM]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mM][eE]=".*\.[pP][iI][fF]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mM][eE]=".*\.[hH][tT][aA]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mM][eE]=".*\.[vV][bB][eE]\)"/\1.txt"/' \
>>                     -e \
>>'s/\([nN][aA][mM][eE]=".*\.[sS][cC][rR]\)"/\1.txt"/' \
>>                     -e \
>>       {
>>        :0:
>>        /home/tmp/crap
>>         }
>>        }
>>
>>###############################################################
>
>Great info!  But in order for me to get it to work without errors, I had to change change the following:
>
><snip>
>'s/\([nN][aA][mM][eE]=".*\.[sS][cC][rR]\)"/\1.txt"/' \
>                     -e \
>       {
>        :0:
>        /home/tmp/crap
>         }
>        }
></snip>
>
>to
>
>'s/\([nN][aA][mM][eE]=".*\.[sS][cC][rR]\)"/\1.txt"/' \
>
>        :0:
>        /home/tmp/crap
>         }
>        }
>
>Removing the "}: and the final "-e \" seemed to get it working.  I know nothing about procmail and am not very good with regular expressions, but it seems to be working correctly now.
>
>Anyway, anyone have any comments?  Did I break it or fix it?
>
>Thanks,
>Scott


Colin, thanks the the explanation in previous message :)  I just send em to /dev/null since I am the only one on the server (except a few relatives) and they don.t want attachments in there email anyway. (Other than family pictures, and I see gif and jpg are still open).

OK  I ran this with VERBOSE=ON and tailed it.  I too had errors until I made Scotts revision.  Is Scotts revision correct?

Thanks!

Mike