Mailing List Archive

generate rule, wrong?
Hello
After generating this rule rawbody, spam mail like this words still appear, possible mistake from my syntax?

>required_score 5
>use_pyzor 1
>use_razor2 1
>rawbody BECAUSE_OPTIN /(geschiedene|sexuellen|beziehungen|singlefrauen|zweisamkeit|Dating-Szene|datingszene|sex|männern|wild|unersättlich|dates|girl)/i
>score BECAUSE_OPTIN 5.0

Thanks
Re: generate rule, wrong? [ In reply to ]
On Fri, 22 May 2020 at 10:28, Maurizio Caloro <mauric@gmx.ch> wrote:
>
> Hello
> After generating this rule rawbody, spam mail like this words still appear, possible mistake from my syntax?
>
> >required_score 5
> >use_pyzor 1
> >use_razor2 1
> >rawbody BECAUSE_OPTIN /(geschiedene|sexuellen|beziehungen|singlefrauen|zweisamkeit|Dating-Szene|datingszene|sex|männern|wild|unersättlich|dates|girl)/i
> >score BECAUSE_OPTIN 5.0

Perhaps there are some other rules with negative scores that reduce
the total score so it is <5? Did you try using body instead of
rawbody? To use body, also set 'normalize_charset 1' and ensure the
text in the rule is entered as UTF-8.
Re: generate rule, wrong? [ In reply to ]
On Fri, 2020-05-22 at 11:18 +0200, Maurizio Caloro wrote:
> Hello
> After generating this rule rawbody, spam mail like this words still
> appear, possible mistake from my syntax?
>
> > required_score 5
> > use_pyzor 1
> > use_razor2 1
> > rawbody BECAUSE_OPTIN
> > /(geschiedene|sexuellen|beziehungen|singlefrauen|zweisamkeit|Dating-
> > Szene|datingszene|sex|männern|wild|unersättlich|dates|girl)/i
> > score BECAUSE_OPTIN 5.0
>
Two things to look at:

- Its a good idea to only write a new rule after you've had one or two
messages containing the things your new rule is meant to trigger on.
Always test the rule against captured spam before using it on
your live main stream.

I have a copy of SA installed on a laptop where its only used only for
rule testing and I wrote a set of scripts to make testing easier and
to install the modified ruleset in the live mail stream.

- you need some sort of filter between SA and the end recipient of
incoming mail that will remove all messages that SA has marked as
spam. This is what stops the end recipient from seeing the spam.

What the filter does is up to you: mine quarantines spam for 7 days
before deleting it and reports new spam to me via logwatch.

So, if you have a filter, test that it works with new rules, and if
not, build or configure one. Procmail is commonly used as a per-user
filter, but this does mean that every user has their own spam folder,
while an arrangement like mine (filter immediately after SA) puts all
spam in a common holding area.

HTH

Martin