Skip to content

1.0.102: drag-and-drop rule ordering, ⚠ on rules that can never fire

Choose a tag to compare

@github-actions github-actions released this 29 Oct 20:05
· 8 commits to main since this release

Rules in the right order, and a ⚠ on the ones that can never fire

MailScanner reads filename.rules.conf (and filetype.rules.conf, the archives.* twins and every ruleset) top to bottom and the first match wins. An allow \.doc\.docx$ added below the stock possible filename hiding deny never allows anything, and until now nothing said so.

  • Drag to reorder — every table editor in the Config tab (rulesets, file rules, RBL lists, scanners, host lists) has a ⋮⋮ handle; drag a row where it belongs, or use ↑ / ↓ from the keyboard. The file is written in the order you see: a rule's comment block and spacing move with it, a deleted rule takes its comment along, and an unchanged order reproduces the file byte for byte.
  • ⚠ a rule an earlier one always beats — for file rules, each pattern yields example names generated from the pattern itself, and one run of the engine's perl tells which rule catches them first. A rule whose examples are all taken by an earlier rule with a different action gets ⚠; the tooltip names the winning row and the example (never reached for names like file.doc.docx — row 7 (deny …) matches first), a click jumps to it. Same-action duplicates are not flagged. The check re-runs after every drag or edit, before you save.
  • The tester says it too — msfe-ng conf test, the Config tab's tester and the doctor warn line N is never reached for names like 'file.doc.docx': line M (deny) matches first, with a link to the line.
  • API: GET /api/conf/file carries shadows; POST /api/conf/check-rows checks a set of rows without saving.

Reminder from the field: the rule files are read when a MailScanner child starts, so a hand edit needs Reload MailScanner; a save from the Config tab does that for you.

Wiki: Config, Troubleshooting. Upgrade: msfe-ng upgrade, or the Service tab.