[Exim] My Latest Filter Version

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Perkel
Data:  
A: exim-users
Assumpte: [Exim] My Latest Filter Version
# Exim Filter

# Viruses and Executable Atachments

if $h_subject: contains "Seven Dwarfs"
or $message_body matches
"(?:Content-(?:Type:\\\\s*[\\\\w-]+/[\\\\w-]+|Disposition:\\\\s*attachment);\\\\s*(?:file)?name=|begin\\\\s+[0-7]{3,4}\\\\s+)(\"[^\"]+\\\\.(?:vbs|vbe|wsh|wsf|js|jse|exe|com|bat)\"|[\\\\w.-]+\\\\.(?:vbs|vbe|wsh|wsf|js|jse|exe|com|bat))[\\\\s;]"

then
save /var/mail/viruses
finish
endif


# Never Filter Exim Related Messages (or this filter would be filtered)

if "$h_subject: $message_body:" contains "exim"
then
finish
endif


# --------- Spam Filtering - Adds Header Tags for Spam --------------
# This filter just labels spam - doesn't delete it.


# Tests on subject Only

if $h_subject: contains "[ADV]"
or $h_subject: contains "promo"
or $h_subject matches "^ADV[: ]"
or $h_from contains "market"

then
headers add "X-Spam: [SPAM] - Marketing - $1 $2 $3"
finish
endif



# Subjects and Message Body Together - Sex - Drugs

if "$h_subject: $message_body:" matches "(herbal .*viagra|\
attract.*opposite sex|\
celebrity .*(sex|videos?)|\
youngest .*girls|\
Sex Pill|\
bad girls|\
penis enlargement|\
voyeur cams|\
live sex|\
LIVE ?SHOWS|\
increas.*sexual .*performance|\
porn tryout|\
up ?skirts|\
sex.* (cams|anal|enhance)|\
Free Pics)"

then
headers add "X-Spam: [SPAM] - Sex - $1 $2 $3"
finish
endif


if "$h_subject: $message_body:" matches "(Retire Beanie Babies|\
septic .*(expert|system)|\
accept .*credit cards|\
off inkjet cartridges|\
unsecured .*(master card|visa|credit)|\
free (cell
phone|preview|vacation|debt|bargains?|website|leads|.*hosting)|\
absolutely free|\
credit card .*(offer|debt)|\
earn .*(offshore|debt)|\
e-?mail .*(leads|market)|\
market.*solutions?|\
(re)?establish .*credit|\
this .*(one|1) time mail.*|\
money .*making .*programs|\
not .*chain letter|\
income tax.* IRS .*(secret|million)|\
bulk .*hosting|\
targeted leads|\
cash bonus|\
all major brands|\
wholesale .*direct|\
Premium Cigarettes|\
outstanding value|\
additional rebate|\
off coupon|\
dish (network|offer)|\
(vacation|weight loss|limited time) .*offer|\
(order|perscription) .*medications .*online|\
Saving.* Life Insurance|\
(Unlimited|per minute) .*Long Distance|\
Low.* Mortgage Rates)"

then
headers add "X-Spam: [SPAM] - Products - $1 $2 $3"
finish
endif


# Exim has a 1024 character limit

if "$h_subject: $message_body:" matches "(Increase Your Sales|\
Spam Free e-?mails?|\
luxury car|\
best .*casino|\
can make you rich|\
financial (freedom|future)|\
Earn Millions|\
No Spending Limits|\
Future Millionaire|\
never before seen|\
special offer|\
financial freedom|\
dear candidate|\
instant access|\
Section 301.*Paragraph|\
cable converter|\
Skyrocket Sales|\
Explode profits|\
e-?mail marketing|\
earn additional income|\
fastest way to earn|\
Register to Win|\
premium vacation package|\
site ranking|\
spam friendly offshore website|\
Spending cash|\
money (.*guaranteed!|act now)|\
build .*your .*business|\
Congratulations.* You.* Won|\
seen.* national tv|\
stock .*strong buy|\
work from home .*(money|income)|\
submit .*search engines)"

then
headers add "X-Spam: [SPAM] - Scams - $1 $2 $3"
finish
endif