equal
deleted
inserted
replaced
154 |
154 |
155 # Now we can use these to SCAN incoming stanzas |
155 # Now we can use these to SCAN incoming stanzas |
156 # If it finds a match, bounce the stanza |
156 # If it finds a match, bounce the stanza |
157 SCAN: body for word in badwords |
157 SCAN: body for word in badwords |
158 BOUNCE=policy-violation (This word is not allowed!) |
158 BOUNCE=policy-violation (This word is not allowed!) |
|
159 |
|
160 #### COUNT |
|
161 |
|
162 COUNT is similar to SCAN, in that it uses a defined SEARCH and breaks it up according to a PATTERN. Then it |
|
163 counts the number of results. |
|
164 |
|
165 For example, to block every message with more than one URL: |
|
166 |
|
167 # Define a search location called 'body' which fetches the text of the 'body' element |
|
168 %SEARCH body: body# |
|
169 # Define a pattern called 'url' which matches HTTP links |
|
170 %PATTERN url: https?://%S+ |
|
171 |
|
172 COUNT: url in body > 1 |
|
173 BOUNCE=policy-violation (Up to one HTTP URL is allowed in messages) |
159 |
174 |
160 ### Stanza matching |
175 ### Stanza matching |
161 |
176 |
162 Condition Matches |
177 Condition Matches |
163 ----------- ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
178 ----------- ------------------------------------------------------------------------------------------------------------------------------------------------------------ |