E-mail filter rules – system description
Storage, validation and permissions of the static message-level and attachment-level rules applied during import.
Overview
Filter rules run in the second step of the import chain (see the incoming e-mail system description) and again as a PDF-based post-filter after PDF text extraction. Table names carry the installation's own prefix in the database.
Data model
| Table | Main fields |
|---|---|
email_filter | name, scope (email, attachment), action, conditions (sender, domain, subject, PDF text, file name, MIME, maximum size), target type and target id, subject regex, invoice number regex, supplier keyword, priority, note, status |
Validation
- Name required; scope only
emailorattachment. - Action:
skip,ignore,link_invoice,link_task,link_partner,link_invoice_by_pdf. - At least one condition (
error_no_match). link_invoice_by_pdfneeds the invoice number regex; the otherlink_*actions need a target id or a subject regex (error_link_target).
Saving and deleting use filter.save and filter.delete; deletion checks no references.
Permissions
- Layer 1: list with base access permission, save and delete with base modify permission.
- Layer 2: the header "+" button follows
canAction(add); thedebugkey is checked. The list key is not checked withcanAction; the functions areUNMAPPED. - Layer 3: no content scope.