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

Re: SPAM Filter



Kara Pritchard said:
> On Wed, 6 Aug 2003, Al Gatton wrote:
>
>> Can anyone on the list tell me a GOOD way to filter some of the SPAM
>> that has been going around lately?
[...]
>> Anyway would be nice to Bounce any
>> email that contains furin characters... Any help?
>
> You can do that with Spam Assassin and Procmail.

To elaborate just a little:

I block some foreign languages (and weird attachment types)  with
Postfix's regexp header checks (you can add more charsets):

in main.cf:
 header_checks = regexp:/etc/postfix/header_checks

contents of header_checks:
---
# anti-spam header checks
#
# Mostly courtesy of '"Perry E. Metzger" <perry@piermont.com>' from
#  the postfix-users mailing list, 26 Dec 2002 13:24:51 -0500
#  These are each one big line - don't wrap

# evil charsets
/^Content-Type:.*charset="?(big5|euc-kr|gb2312|ks_c_5601-1987)"?/   
REJECT Sorry, we do not accept messages in the ${1} character set.

# generally viral attachment extensions
/^Content-(Type|Disposition):.*(file)?name=.*\.(asd|bat|chm|cmd|com|dll|exe|hlp|hta|jse|lnk|ocx|pif|scr|shb|shm|shs|vb|vbe|vbs|vbx|vxd|wsf|wsh)/
   REJECT Sorry, we do not accept .${3} file types.
---

Then postfix delivers mail using procmail, and procmail passes messages
through SpamAssassin before filtering junk out.  Those things' setups are
all pretty well documented all over the web.

--Danny, who does *not* remember asking for pornographic email from anyone
he met last week...



-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.