vltnson
asked on
Spam filtering issue
Dear Experts,
I am running Sendmail with MailScanner on a Redhat Linux ES 3.0. I would like to know if it is possible to setup a Spam filtering to scan for certain "Text" within the message body such: Viagra, cialis, ... If so please give me some instruction on how to approach the seting.
Thank you for your help
vltnson
I am running Sendmail with MailScanner on a Redhat Linux ES 3.0. I would like to know if it is possible to setup a Spam filtering to scan for certain "Text" within the message body such: Viagra, cialis, ... If so please give me some instruction on how to approach the seting.
Thank you for your help
vltnson
Are you using a current version of SpamAssassin with MailScanner? It should catch most of those emails and flag them with a SpamScore. And, you can add custom rules to SpamAssassin for those keywords.
ASKER
Thank you Jlevie for your respond.
Yes I am using a current version of SpamAssassin with MailScanner. I just downloaded MailScanner and installed onto one of my servers about two weeks ago, and it works just fine. The SpamAssassin came with my Linux ES 3.0 Update 4, I think that is pretty current version. I don't know much about SpamAssassin neither MailScanner, could you please kindly lead me through to add custom rules to my SpammAssassin. I couldn't stand spam emails we are getting. I couldn't block them in the /etc/mail/access because every time they come into our mail server they barried themselves in different return addresses.
I am very appreciate your time to help me resolving this problem.
vltnson
Yes I am using a current version of SpamAssassin with MailScanner. I just downloaded MailScanner and installed onto one of my servers about two weeks ago, and it works just fine. The SpamAssassin came with my Linux ES 3.0 Update 4, I think that is pretty current version. I don't know much about SpamAssassin neither MailScanner, could you please kindly lead me through to add custom rules to my SpammAssassin. I couldn't stand spam emails we are getting. I couldn't block them in the /etc/mail/access because every time they come into our mail server they barried themselves in different return addresses.
I am very appreciate your time to help me resolving this problem.
vltnson
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I already had some of those FEATUREs imbeded in my sendmail.mc file and they are work pretty good. What I want to do now is to setup the rules for SpamAssassin so that it could scan for sensitive words such as: Viagra, Cialis... Is it posible to do this?
Yeah, you can add rules to /etc/MailScanner/spam.assa ssin.prefs .conf. There's some examples towards the end of that file and you can look at the SpamAssassin rule sets for more examples.
ASKER
I make some changes to my spam.assassin.prefs.conf but it is not doing the job I am asking for. This is what I have done:
header FRIEND_GREETINGS Subject =~ /you have an E-Card from/i
describe FRIEND_GREETINGS Nasty E-card from FriendGreetings.com
score FRIEND_GREETINGS 100.0
header FRIEND_GREETINGS2 Subject =~ /you have a greeting card from/i
describe FRIEND_GREETINGS2 Nasty E-card from FriendGreetings.com
score FRIEND_GREETINGS2 100.0
header FRIEND_GREETINGS2 Subject =~ /Viagra Cialis/i
describe FRIEND_GREETINGS2 Filter for unwanted spam
score FRIEND_GREETINGS2 100.0
header FRIEND_GREETINGS Subject =~ /you have an E-Card from/i
describe FRIEND_GREETINGS Nasty E-card from FriendGreetings.com
score FRIEND_GREETINGS 100.0
header FRIEND_GREETINGS2 Subject =~ /you have a greeting card from/i
describe FRIEND_GREETINGS2 Nasty E-card from FriendGreetings.com
score FRIEND_GREETINGS2 100.0
header FRIEND_GREETINGS2 Subject =~ /Viagra Cialis/i
describe FRIEND_GREETINGS2 Filter for unwanted spam
score FRIEND_GREETINGS2 100.0
ASKER
hi Jlevie,
The example I posted above doesn't work according to what I need. I am still seeing those emails come through the server. Do you have any better code I may use?
Thank for your help
The example I posted above doesn't work according to what I need. I am still seeing those emails come through the server. Do you have any better code I may use?
Thank for your help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oh yeah, forgot to add that you should add those rule sets to /etc/mail/spamassassin/
ASKER
I am still getting a lot of spam on my server eventhough I have Mailscanner installed an actived. As I memtioned above I need to filter out emails that contain specific "text". If someone could give me some example I'll be appreciate that. This is what I had tried but it wasn't do any good...
header FRIEND_GREETINGS2 Subject =~ /Viagra, Cialis/i
describe FRIEND_GREETINGS2 Filter for unwanted spam
score FRIEND_GREETINGS2 100.0
Please help...
header FRIEND_GREETINGS2 Subject =~ /Viagra, Cialis/i
describe FRIEND_GREETINGS2 Filter for unwanted spam
score FRIEND_GREETINGS2 100.0
Please help...
The spamassassin rules are using Perl regular expressions, so what you have above would only match a Subject that contained exactly "Viagra, Cialis" (case insensitive). To match either of those to words in a Subject you'd need to use:
Subject =~ /Viagra|Cialis/i
Subject =~ /Viagra|Cialis/i
ASKER
Thank you jlevie for your responding. I have been trying to setup this spam filter for a while now but I was unsuccessfully atempted. If you could give me some more instructions on how to setup a spam filter that would scan the "body" rather than the "subject" of an email for those sensitive words such as: viagra | Cialis... I would be very much appreciate that.
Thank you
Thank you
So, vltnson, can you do anything for yourself? Have you ever tried searching for something on your own on the Internet? Mailscanner with spamassassin is pretty easy to figure out and there is a ton of online documentation about it.
Besides, you will NOT be able to write all the rules you need in order for your spam filter to be successful. You will need to download a couple rulesets in order for it to be effective. Don't worry, they're free.
Rule Writing Basics
http://www.exit0.us/index.php?pagename=RulesBasics
Google: spamassassin rules
Besides, you will NOT be able to write all the rules you need in order for your spam filter to be successful. You will need to download a couple rulesets in order for it to be effective. Don't worry, they're free.
Rule Writing Basics
http://www.exit0.us/index.php?pagename=RulesBasics
Google: spamassassin rules
ASKER
I tried Subject=~ /Viagra|Cialis/i and sent a test message with the subject contains "Viagra" it still gets through my server. Do I need to restart any services to have this spam filter takes effect?
You would need to restart Mailscanner for it to read the changed config file.
ASKER
Jlevie, Thank you for all your help. I got a few pretty useful link that townsepw posted above. I based on those examples to apply to the ruleset and they work like a charm.
ASKER
No one is able to help resolving this question so please delete and refund the point
Thank you