Email filters
New to Tiki25, email filters have been added to Cypht.
They leverage the Sieve standard, using https://packagist.org/packages/henrique-borba/php-sieve-manager
Here is the code: https://github.com/cypht-org/cypht/tree/master/modules/sievefilters
If your mail server doesn't support Sieve, Tiki will handle the filtering. Just add a command to Tiki Scheduler or a cron job:
Copy to clipboard
php console.php sieve:filters
Exceptions:
Only available in Sieve
- Redirects (like a forward except that email is modified so replies go to the original sender)
Better in Sieve
- Rejecting: When done via Sieve, it is done when the email delivery is attempted. So the mail server is instructed not to accept the email, which is way better than accepting, and then replying with a bounce message. Ref: http://www.dontbouncespam.org/#BVR
Only available in Tiki
- Running filters via a cron job when Sieve is not available
- Functionality not covered by the Sieve standard. Ex.:
- Move an email to a tracker item via Email folders Tracker Field
- Controlled by the preference "email_to_tracker_mode". By default, emails are moved (removed from IMAP) after creating the tracker item.
- In staging or pre-dogfood environments, this preference should usually be set to "copy" to avoid data loss when servers are refreshed. See System Configuration.
- Planned feature: Moving an email from one mailbox to another (In Sieve, it's possible to redirect, but a move is cleaner because a redirect could bounce)
- Move an email to a tracker item via Email folders Tracker Field
Future plans
- More action will be added later (ex.: create a task from an email with a certain pattern, etc.)
- We will leverage Machine Learning so Tiki learns how you filter your emails manually: Machine Learning for Email
Related links
- Initial commit: https://gitlab.com/tikiwiki/tiki/-/merge_requests/1837
- Email bounce handling
- Email as a first-class citizen
Info from other systems
- https://docs.gandi.net/en/gandimail/sieve/
- https://blogs.kolabnow.com/2022/09/19/how-are-server-side-sieve-filters-working-again
Related links
- http://sieve.info/
- https://github.com/cypht-org/php-sieve-manager/wiki/Comparison-of-Sieve-libs-in-PHP
Page alias: Sieve rfc5228