2025-08-06 10:31:13 -07:00
2025-08-05 12:37:36 -07:00
2025-08-03 21:35:22 -07:00
2025-08-05 14:37:49 -07:00
2025-08-05 12:37:36 -07:00
2025-08-04 10:05:23 -07:00
2025-08-05 12:37:36 -07:00
2025-08-05 11:06:17 -07:00
2025-08-06 10:31:13 -07:00
2025-08-05 14:37:49 -07:00
2025-08-04 12:26:52 -07:00
2025-08-05 11:06:17 -07:00
2025-08-03 11:17:13 -07:00
2025-08-04 10:05:23 -07:00
2025-08-04 10:05:23 -07:00
2025-08-04 10:05:23 -07:00
2025-08-04 07:34:34 -07:00

Email Organizer

A self-hosted AI-powered email organization system that automates folder sorting, prioritization, and rule recommendations through natural language configuration.

Core Value Proposition

  • Natural Language Rules: Define email organization logic in plain English instead of writing sieve/filter rules
  • Smart Separation: Automatically categorize marketing emails, receipts, and transactional messages
  • Adaptive Intelligence: Learns your preferences to star important emails and suggest new organizational patterns

Technical Overview

Stack:

  • Backend: Flask (Python 3.10+)
  • Frontend: HTMX + AlpineJS + DaisyUI (Tailwind CSS)
  • Database: PostgreSQL
  • AI: OpenAI-compatible API endpoints

Key Components:

  1. Rule Engine: Converts natural language rules → executable classification logic
  2. Email Processor: Polls IMAP server, applies AI classifications, moves messages
  3. Recommendation System: Analyzes usage patterns to suggest new folders/rules

Getting Started

Prerequisites

  • Python 3.10+
  • PostgreSQL 14+
  • IMAP server access

Setup

# Install dependencies
pip install -r requirements.txt

# Set up development environment (PostgreSQL and IMAP server)
flask setup-dev

# Configure environment
cp .env.example .env
# (Edit .env with your DB/IMAP credentials)

# Initialize database
flask db upgrade

# Run development server
flask run

Roadmap

Milestone 1: Prototype (Current Focus)

  • Core infrastructure setup
  • Basic UI for rule configuration
  • Mock email processing pipeline
  • Database schema implementation

Future Milestones

  • MVP - enter your imap server. You list out folders and rules, and once a day emails in the "Pending" folder will be reorganized.
  • "Import" your list of folders from your imap server
  • Polling every 5 minutes, working off recent emails since last poll
  • Label support for services like gmail
  • Generate config to automate integration into imap servers like dovecot or gmail or proton
  • Supporting auth / multi user. Admin controls the list of users, users control their folders.
  • Making a paid, hosted version
  • Auth via google / facebook / etc.
  • Automatically star based off of your habits

Data Model

Users

Column Type Description
id UUID Primary key
email VARCHAR Unique identifier
password_hash BYTEA Argon2-hashed
imap_config JSONB Encrypted server settings

Folders

Column Type Description
id UUID Primary key
user_id UUID Foreign key
name VARCHAR Display name
rule_text TEXT Natural language rule
priority INT Processing order

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Note

: All new features require corresponding unit tests and documentation updates.

Description
No description provided
Readme 1.7 MiB
Languages
Python 80.9%
HTML 18.2%
JavaScript 0.6%
Mako 0.3%