How to block emails that contains a word in subject?

Discuss the ConfigServer MailScanner Front-End script
Post Reply
Sergio
Junior Member
Posts: 1715
Joined: 12 Dec 2006, 14:56

How to block emails that contains a word in subject?

Post by Sergio »

Hi Sarah,
in the FrontEnd we have white / black lists that we could manage for the server, but is it possible to block emails that contains specific words on the subject? and that could be managed like the white/black lists?

Regards,

Sergio
Sarah
Moderator
Posts: 934
Joined: 09 Dec 2006, 22:49

Re: How to block emails that contains a word in subject?

Post by Sarah »

It's not possible to do that via the MailScanner Front-End, no. You could do it either via an exim filter or via spamassassin rules if you want to do it server-wide.

Instructions on writing spamassassin rules can be found here:
http://wiki.apache.org/spamassassin/WritingRules

Regards,
Sarah
Sergio
Junior Member
Posts: 1715
Joined: 12 Dec 2006, 14:56

Re: How to block emails that contains a word in subject?

Post by Sergio »

Thank you Sarah, I will read the wiki.

Sergio
Sergio
Junior Member
Posts: 1715
Joined: 12 Dec 2006, 14:56

Re: How to block emails that contains a word in subject?

Post by Sergio »

Hello Sarah,
hope you can help me with this, an advice is welcome.

I have created my own rules and they are working great, the only problem that I am facing is this:

I have created a rule that deletes emails that contains a word that I have defined in it, I have set MailScanner to delete all the emails with high MCP over 10. Here are some examples:

1. Here the email was deleted even if SA score is 3.22 (good, as it is what I wanted):
subject info with bad word here 131Kb 3.22 11.00 MCP

2. Here the email was delivered even that my MCP is 11
subject info with bad word here 179Kb 11.45 11.00 Spam / MCP

So, my question is, why my rule is working with a low Spam score and it is not if the Spam score is something higher than 5 ?

This is what I have set in MailScanner configuration:
MCP Checks = YES
# Do the spam checks first, or the MCP checks first?
# This cannot be the filename of a ruleset, only a fixed value.
First Check = MCP
# The rest of these options are clones of the equivalent spam options
MCP Required SpamAssassin Score = 1
MCP High SpamAssassin Score = 10
MCP Error Score = 1
MCP Header = X-%org-name%-MailScanner-MCPCheck:
Non MCP Actions = deliver
MCP Actions = delete
High Scoring MCP Actions = delete
Bounce MCP As Attachment = no
Is there something else that I need to modify?

Regards,

Sergio

PS: I don't know if I posted in the wrong section but I wanted to continue with the thread that I started a few months back.
Sarah
Moderator
Posts: 934
Joined: 09 Dec 2006, 22:49

Re: How to block emails that contains a word in subject?

Post by Sarah »

Hi Sergio,

I'm afraid I have no idea why this is not working, as it would seem that it should work as you have outlined. The only thing I can think of is that the high-scoring spam action is overriding the high-scoring MCP action. You would have to search the MailScanner mailing list or post your query there to find out if this is the case and how to get it to do what you want.

Regards,
Sarah
Sergio
Junior Member
Posts: 1715
Joined: 12 Dec 2006, 14:56

Re: How to block emails that contains a word in subject?

Post by Sergio »

Thank you Sarah,
I will try that.

Regards,
Sergio
Post Reply