Always looking for good procmail recipes I couldn't resist this one from
Chuck.  However, when I cut and pasted it into my procmailrc file it
generated lots of errors but to my great surprise it actually worked.

If you check out what word wrapping did you will easily see why it had
problems.  There should now be a line continuation character after each of
the -e's because of the line wrapping.  And here I thought Chuck was doing
fancy programmer type indenting!!!

I point this out so that the new users can see how easy it is to get into
trouble by just coping code...even stuff that works!!!



On Mon, 5 Feb 2001 [EMAIL PROTECTED] wrote:
> Put this in /etc/procmailrc
>
>:0
> *^Content-type: (multipart/mixed|application/octet-stream)
> {
>:0 HB
>     *^Content-Disposition: (attachment|inline);
>     *filename=".*\.(ocx|vbs|wsf|shs|exe|chm|pif|vbe|hta)"
>     {
>        SHELL=/bin/sh
>:0 fhbw
>        |/usr/bin/sed -e
> 's/\([nN][aA][mM][eE]=".*\.[oO][cC][xX]\)"/\1.txt"/' \
>                      -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][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"/'
>
>:0 c
>        /tmp/vbs
>     }
> }
>



Gerry

"The lyf so short, the craft so long to learne" Chaucer



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to