[ale] procmail filter on attachment name?
Byron A Jeff
byron at cc.gatech.edu
Thu Aug 21 12:12:41 EDT 2003
>
>
>
> Is it possible to have procmail filter based on an attachment's name
> such as *.pif? I don't want to just cut out all executables as
> sometimes my father and sisterm mail me "cute" stuff as they know I
> don't worry about getting a virus but the spam is just getting annoying.
DUDE! You must be psychic! I was going to post this exact same message. But
I spent two minutes and figured it out for my self. Here's my update
.procmailrc to cut out the SPAM:
--------------------------
:0B:
* ^.*name=.*pif
| $HOME/bin/spamcount
:0B:
* ^.*name=.*scr
| $HOME/bin/spamcount
:0B:
* ^.*name=.*zip
| $HOME/bin/spamcount
:0B:
* ^.*name=.*pif
/dev/null
:0B:
* ^.*name=.*scr
/dev/null
:0B:
* ^.*name=.*zip
Mail/SPAM.ZIP
---------------------------
I thow pifs and scrs away but save the zips because you never know.
spamcount is a trivial script that counts the amount of spam received:
----------------------------
#!/usr/local/bin/bash
SC=~/.spamcount
if [ -r $SC ] ; then
count=$(cat $SC)
else
count=0
fi
echo $[count+1] > $SC
---------------------------
Hope this helps,
BAJ
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list