Skip to content

Instantly share code, notes, and snippets.

@komputerwiz
komputerwiz / BogoFilter.py
Last active November 2, 2022 15:03
afew filter for classifying spam using bogofilter
"""
A filter for [afew](https://afew.readthedocs.io/) that classifies spam
messages using bogofilter.
I couldn't figure out how to get bogofilter to integrate nicely with
offlineimap/notmuch/afew, so I decided to write it myself. It was
surprisingly easy, and perhaps this could inspire others to write their
own custom filters. If functionality grows more complex, I might
package this into a pip module via the `afew.filter` entry point.