Skip to content

Commit

Permalink
mail/rspamd: fix model (missing properties), constraint bugs (opnsens…
Browse files Browse the repository at this point in the history
…e#1120)

* mail/rspamd: fix model (missing properties), constaint bugs
  • Loading branch information
fabianfrz authored Jan 6, 2019
1 parent a72edff commit 8257b1f
Showing 1 changed file with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions mail/rspamd/src/opnsense/mvc/app/models/OPNsense/Rspamd/RSpamd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,35 @@
<MaximumValue>999</MaximumValue>
<Constraints>
<check001>
<ValidationMessage>This field must be bigger than the header score.</ValidationMessage>
<ValidationMessage>This field must be bigger than the subject score.</ValidationMessage>
<type>ComparedToFieldConstraint</type>
<field>subjectscore</field>
<operator>gt</operator>
</check001>
<check002>
<ValidationMessage>This field must be bigger than the reject score.</ValidationMessage>
<type>ComparedToFieldConstraint</type>
<field>headerscore</field>
<operator>gt</operator>
</check002>
<check003>
<ValidationMessage>This field must be bigger than the greylist score.</ValidationMessage>
<type>ComparedToFieldConstraint</type>
<field>greylistscore</field>
<operator>gt</operator>
</check003>
</Constraints>
</rejectscore>
<headerscore type="IntegerField">
<Required>N</Required>
<MinimumValue>1</MinimumValue>
<MaximumValue>999</MaximumValue>
<Constraints>
<check001>
<ValidationMessage>This field must be lower than the subject score.</ValidationMessage>
<type>ComparedToFieldConstraint</type>
<field>subjectscore</field>
<operator>lt</operator>
</check001>
<check002>
<ValidationMessage>This field must be lower than the reject score.</ValidationMessage>
Expand All @@ -35,7 +60,7 @@
<operator>gt</operator>
</check003>
</Constraints>
</rejectscore>
</headerscore>
<greylistscore type="IntegerField">
<Required>N</Required>
<MinimumValue>1</MinimumValue>
Expand All @@ -61,6 +86,31 @@
</check003>
</Constraints>
</greylistscore>
<subjectscore type="IntegerField">
<Required>N</Required>
<MinimumValue>1</MinimumValue>
<MaximumValue>999</MaximumValue>
<Constraints>
<check001>
<ValidationMessage>This field must be bigger than the header score.</ValidationMessage>
<type>ComparedToFieldConstraint</type>
<field>headerscore</field>
<operator>gt</operator>
</check001>
<check002>
<ValidationMessage>This field must be lower than the reject score.</ValidationMessage>
<type>ComparedToFieldConstraint</type>
<field>rejectscore</field>
<operator>lt</operator>
</check002>
<check003>
<ValidationMessage>This field must be bigger than the subject score.</ValidationMessage>
<type>ComparedToFieldConstraint</type>
<field>greylistscore</field>
<operator>gt</operator>
</check003>
</Constraints>
</subjectscore>
<rewritesubject type="TextField">
<Required>N</Required>
</rewritesubject>
Expand Down

0 comments on commit 8257b1f

Please sign in to comment.