?
Solved

Spamassassin Keyword Blacklist Configuration

Posted on 2009-02-15
2
Medium Priority
?
3,018 Views
Last Modified: 2013-12-16
How to I configure spamassassin in local.cf to catch certain keywords?

Example:  I want to block the keyword 'viagra'.
0
Comment
Question by:thomaswright
2 Comments
 
LVL 23

Accepted Solution

by:
Maciej S earned 1000 total points
ID: 23644487
Put into your local.cf:

body BODY_VIAGRA /viagra/i
describe BODY_VIAGRA Something about viagra
score BODY_VIAGRA 2

Some explanations:
body BODY_VIAGRA /viagra/i
body - search for specified word/phrase in email's body (you can put here 'header' to search headers instead of body).
BODY_VIAGRA - rule name (can be anything you want)
/viagra/i - regex pattern to match your word/phrase. ending 'i' flag means case insensitive

describe BODY_VIAGRA Something about viagra
This line is description for rule BODY_VIAGRA, and description is: "Something about viagra".

score BODY_VIAGRA 2
Give 2 additional points every email which matches BODY_VIAGRA rule.
0
 
LVL 3

Author Closing Comment

by:thomaswright
ID: 31547074
Thank you! That was an excellent and fast answer.
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question