by Red Wahn
Version 1 (July 18, 2024)
Download (12 downloads)
[Premium] A flow to autodelete emails matching certain glob patterns
- sender
- subject
- body
using K-9 Mail notifications.
Get a notification (or log entry) if a message gets deleted with a list of matching glob patterns. You can turn this off later.
(Disclaimer: Not responsible for data loss.)
Things you'll need to do to get this to work:
▶️ In the flow
- add the name of your mail account to the list 'conf_inboxes' (other accounts are ignored)
- edit 'conf_spam_senders', 'conf_spam_subjects' and 'conf_spam_bodies' so they match the kind of spam you're getting. You can use glob patterns. Make sure to remove patterns that match legitimite emails (like sender netflix if you have that).
- turn off logging for the flow (the decisions and glob patterns that matched are still logged)
Once you're happy with the results, you can turn off notifications for deleted messages by setting 'conf_notify_when_deleting' to 0
🟥 K-9 Mail Recommended settings
- Settings>General Settings>Interactions>Confirm Actions: Disable confirmation for 'Delete (from notification)'
- Settings>General Settings>Notifications>Show 'delete' button: Only for singular messages (as a precaution)
- Settings>{Account}>Folders>Trash folder: Make sure this is set
☑️ Other prerequisites
- use the K-9 Mail app
- allow Automate notification access
- English system language (or change block #42)
- maybe Android 14 (you might have to change what parts of the notification are used as sender, subject and body in blocks #17 and #22)
- from my testing it works with multiple messages at the same time, but there could potentially be issues