On 1/29/2011 9:30 AM, Wietse Venema wrote:
Noel Jones:
On 1/28/2011 4:29 PM, Jerrale G wrote:
Here is what I have tried so far:

/(^X-Spam-Status:\sYes,\sscore=\d\d(\.\d)?\s)/gi
DISCARD High Potential for Spam
That's overly complicated.

/^X-Spam-Status: Yes/  DISCARD High Spam Score

will do the same thing.


Even withn the Discard, does it reflect its action in the log?
I think it is required of me to have these logged.
The discard action is logged with the client, the sender and
the current recipient.  With multi-recipient mail, only one
recipient is logged.
To log all discarded recipients, filter the mail to the discard(8)
delivery agent:

     ...pattern...      filter discard:

According to the manpage, discard(8) was added with Postfix 2.2.

Note; when a message triggers multiple filter actions, only the
last filter action takes effect.

        Wietse
Hey, Thanks for the replies. John Green, a colleague, read and told me, after me asking the question about logging, that the "optional message" specified is what gets logged.

We haven't been able to get pcre to do anything; text substitution, spam discarding, alerting, triggering or anything, We have started resorting to rewriting the source code, which will be tedious each time it comes time to upgrade. Making patches with diff and such.
Here is our playground:

/^(.*)127\.0\.0\.\d+(.*)$/

        REPLACE $1173.50.101.12$2

/^(.*\()[\w\d_-\.]( \[)127\.0\.0\.1(\].*)$/

        REPLACE $1mail.sheltoncomputers.com$2173.50.101.12$3

if /^X-Spam-Status:\sYes,\sscore=(\d\d+\)\s.*$/
   /^X-Spam-Status:\sYes,\sscore=(\d\d\+\.\d+)\s.*$/
endif
        DISCARD High Potential for Spam. Score: $2

/^(.*)server1\S+?(.*)$/
        REPLACE $1mail.sheltoncomputers.com$1

/^(.*)mail\S+?(.*)$/
        REPLACE $1mail.sheltoncomputers.com$1


We know, pertaining to operators, limited to nested "if"'s and "ifend":
if pattern
or patterns..
.........
endif
ACTION optional message with locally partitoned strings set as variables in order of occurance.

Not much different from C# or #bash. We have seen log lines describing errors with the patterns, their operands, or the operators. Using the exact pcre coding above and regexps,we see no error output in the log using the lines above; however, we're sure there's an error.






Jerrale G.
SC Senior Admin

Reply via email to