baruwaproject / baruwa2

Baruwa 2.0
http://www.baruwa.org
GNU General Public License v3.0
21 stars 9 forks source link

Added ordering to put domain rules below user rules #56

Open TetraAsh opened 9 years ago

TetraAsh commented 9 years ago

This resolves issues where spam rule appear with domain rule above the user rule and thus only the domain rule gets obeyed in some circumstances

akissa commented 9 years ago

This is the incorrect approach, the ordering happens in the msrulesets view

TetraAsh commented 9 years ago

Didn't seem to work (see log below), but as soon as I ordered the rules its working fine.

Strangely and it may be coincidence or some other factor, it was fine in spamscore but not highspamscore

/var/log/maillog: Nov 24 11:01:09 mx3 MailScanner[28453]: Read rule (To: @domain2.com 9) from database for keyword highspamassassinscore Nov 24 11:01:09 mx3 MailScanner[28453]: Read rule (To: admin@domain2.co.uk 6) from database for keyword highspamassassinscore Nov 24 11:01:09 mx3 MailScanner[28453]: Read rule (To: relay@domain1.com 6) from database for keyword highspamassassinscore Nov 24 11:01:09 mx3 MailScanner[28453]: Read rule (To: @domain1.com 8) from database for keyword highspamassassinscore

akissa commented 9 years ago

That is by design, it is pointless to have user rules if they are going to be overridden by the domain rules.

TetraAsh commented 9 years ago

it seems to me that once its found the first match it then it stops looking, so in the above an email for admin@domain2.com would hit the *@ rule before it got to the admin@ rule

P.S. I just noticed when i re-wrote the domain names i used domain2.com and domain2.co.uk....they were supposed to be the same domain.