Eduardo Gimeno wrote:

2.-SA was classifying mail properly, attending to "^X-Spam-Status: .*Yes",
into spam and ham folders. Since yesterday, all legitimate (ham) mail is
going directly to SPAM folder, without any mark. What has changed??? I
noticed the headers were including the tag:

X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,
     FORGED_RCVD_HELO,HTML_MESSAGE autolearn=ham version=3.1.0

I suspected that the "YES" from "baYES_00" was being filtered with the
rule ".*Yes", and I changed the rule to "^X-Spam-Status: Yes". Now it
works, but I don't understand why I had to do this change.

Regular expressions are greedy. They will always match the largest value they can.

"^X-Spam-Status: .*Yes" means match "X-Spam-Status: " at the beginning of the line then as many characters as possible then "Yes". I am surprised that it's not case sensative, though.

Since the location of "Yes" is well defined, it's better not to use ".*" and keep a single space.

But I also don't see that this has anything to do with spamassassin, since filing mail should be the job of the MTA.

--
Good day, eh.
Chris

Reply via email to