Page 1 of 1

How to block emails that contains a word in subject?

Posted: 18 Sep 2010, 19:54
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

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

Posted: 12 Oct 2010, 10:21
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

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

Posted: 13 Oct 2010, 00:57
by Sergio
Thank you Sarah, I will read the wiki.

Sergio

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

Posted: 06 Jun 2011, 18:14
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.

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

Posted: 12 Jun 2011, 15:40
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

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

Posted: 12 Jun 2011, 17:20
by Sergio
Thank you Sarah,
I will try that.

Regards,
Sergio