0

I would like to add a rule that blocks all incoming e-mails that contain a certain expression. Ex: 'Test Phrase'. I have added the line rawbody NO_SPAMW /Test" *"Phrase/i but it seems it doesn't work. Can you tell me what is the correct way to parse a space to spamassassin?

Thank you!

Alex
  • 287
  • 2
  • 9
  • 17

1 Answers1

1

You can match a space with \s.

rawbody TEST_PHRASE /test\s*phrase/i
score TEST_PHRASE 0.1
describe TEST_PHRASE This is a test

More about writing custom rules here

clement
  • 3,289
  • 2
  • 17
  • 11
  • I tried to add the rule but nothing happens. I am using spamassassin with mimedefang. After a lot of unsuccessful testing I've tried stopping spamassassin service, and used only mimedefang but without any result. Any help would be highly appreciated. – Alex Mar 20 '14 at 13:45
  • I tried this rule before answering here. I use SPamassassin with `spampd`. Hope this should help http://www.mickeyhill.com/mimedefang-howto/ – clement Mar 20 '14 at 14:01