-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please document a working regexp example #423
Comments
@systemcrash I needed to compile a regexp rule recently, and also struggled to figure out the regexp module. Eventually I got something working. Below is the content of my local.d/regexp.conf file, hope it helps.
|
What field were you filtering on and what was the typical content?
The module isn't the easiest to use, I have to admit...
…On Wed, 22 Apr 2020 at 15:28, Aragon Gouveia ***@***.***> wrote:
@systemcrash <https://github.com/systemcrash> I needed to compile a
regexp rule recently, and also struggled to figure out the regexp module.
Eventually I got something working. Below is the content of my
local.d/regexp.conf file, hope it helps.
"RE_SEXTORTION" = {
re = '/your/{words} && /password/{words} && /buy/{words} && /bitcoin/{words}';
score = 15.0;
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#423 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6DUJGEHZD3OMBP4AQ2ILRN3WH5ANCNFSM4JKLW37Q>
.
|
It filters on the {words} type, which is a transformation on the message body documented as follows:
The content was sextortion type emails that I was given as examples. They were sneakily encoded with strange UTF-8 character sequences, so {words} and the regexp patterns I gave seemed good enough given the size and type of the user base in question. |
I checked the regexp module page, and could not make a working .conf file.
Specifically, I found this in the code:
And wanted an expression like:
re = 'X-Forefront-Antispam-Report=/SFV:SPM/iH'
But the regexp page speaks only about regexp, and Internal functions, but not how to use them.
Which internal function do we call to say "yup, definitely spam, drop this shit"? Why perform all those binary checks (internal functions) if the regexp itself is the check we need?
Please show an example (and document it) that can go in
local.d/regexp.conf
- Ideally one that will immediately a) learn spam and reject or b) drop or discardToday, with milter-regex, the syntax there is clear, e.g.:
The text was updated successfully, but these errors were encountered: