[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] Getting Mail Bombed!
- Subject: RE: [cobalt-users] Getting Mail Bombed!
- From: Michael <mike@xxxxxxxxxx>
- Date: Wed Jul 25 08:26:58 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
This sounds really useful, thank you. However, I have never used procmail before. Where is the file pocmailrc It is not in etc like you list below and I do not have a directory /home/crapper.
This probably sounds stupid :) sorry.... Just that I have never used procmail before. I am on a raq4
Thanks!
Mike
At 07:49 PM 7/23/2001 -0400, you wrote:
>There must be one assumption here and that is that the mail server is Linux
>(or some Unix variant) so therefore this can be handled with *relative*
>ease.
>
>Try this little number in your global /etc/procmailrc accompanied by a small
>shell script (at the foot of this email) to clean up the mess in
>/home/crapper every so often
>
>
>####################cut below this line###################
># purpose
># recipe mangles attachments of filename type defined, converts them into
># files called "1.txt" and moves the email into the crapper (/home/crapper)
># It's easy to add an autoresponder to this if you want to automagically
>tell
># someone they sent you a nastygram and they should clean their system PDQ
># customization
># This recipe can be extended almost limitlessly if you wish to define new
># filenames. For example, if you wish to add ".bat" (and that might
># be a "Good Thing" ©) add the filename into the filename line, preceded
># by a pipe "|" so in this case:
># *filename=".*\.(vbs|wsf|eml|shs|exe|nws|chm|pif|vbe|hta|scr)"
># becomes:
># *filename=".*\.(vbs|wsf|eml|shs|exe|nws|chm|pif|vbe|hta|scr|bat)"
>#Then build your regexp:
>#'s/\([nN][aA][mM][eE]=".*\.[bB][aA] [tT]\)"/\1.txt"/' \
># -e \
>#and you're good to go with a new filetype!
>
>: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 \
>v's/\([nN][aA][mM][eE]=".*\.[sS][cC][rR]\)"/\1.txt"/' \
> -e \
> {
> :0:crapper.lock
> /home/crapper
> }
> }
>
>Next, add a cron job to "flush the crapper" I flush mine every 4 days or so
>(I know...I know it's not terribly hygenic but WTF) :-) :-) this is best
>accomplished with a quick homebrewed shell script unimaginatively named
>"flush.sh" and consisting of the following:
>
>#!/bin/sh
># Periodically flush files older than x days (one day in this example)
>
>find /home/crapper -type f -ctime +1 | xargs rm
>
>[HTH] Hope This Helps (someone)
>Regards to all,
>-Colin
>--
>Colin J. Raven
>
>_______________________________________________
>cobalt-users mailing list
>cobalt-users@xxxxxxxxxxxxxxx
>To Subscribe or Unsubscribe, please go to:
>http://list.cobalt.com/mailman/listinfo/cobalt-users