f646c597dc
- 14 SQLAlchemy models (mail_accounts, mail_folders, mails, attachments, labels, rules, templates, signatures, etc.) - AES-256 encrypted credential storage - IMAP sync service (ARQ-ready, sync trigger endpoint) - SMTP send/reply/forward service - Mail rule engine (condition matching → move/label/flag/forward) - Vacation auto-reply with dedup (vacation_sent_log) - PGP integration (key import, encrypt/decrypt, contact public keys) - Shared mailboxes with delegate access + send permissions - HTML sanitization (nh3) - Full-text search (ILIKE fallback, tsvector-ready) - Thread grouping via References/In-Reply-To headers - Template variable substitution - Contact/company auto-linking from email addresses - Calendar event creation from mail - 46 tests covering all 40 acceptance criteria - Ruff lint clean, format clean - Full regression: 527 tests pass (0 failures)
32 lines
932 B
Python
32 lines
932 B
Python
"""Mail plugin — IMAP/SMTP, threading, templates, rules, PGP, delegates."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from app.plugins.base import BasePlugin
|
|
from app.plugins.manifest import PluginManifest, PluginRouteDef
|
|
|
|
|
|
class MailPlugin(BasePlugin):
|
|
"""Mail plugin for email management: IMAP sync, SMTP send, threading, rules, PGP."""
|
|
|
|
manifest = PluginManifest(
|
|
name="mail",
|
|
version="1.0.0",
|
|
display_name="Mail",
|
|
description=(
|
|
"Email management: IMAP sync, SMTP send, threading, "
|
|
"templates, rules, vacation, PGP, delegates, labels."
|
|
),
|
|
dependencies=[],
|
|
routes=[
|
|
PluginRouteDef(
|
|
path="/api/v1/mail",
|
|
module="app.plugins.builtins.mail.routes",
|
|
router_attr="router",
|
|
),
|
|
],
|
|
events=[],
|
|
migrations=["0001_initial.sql"],
|
|
permissions=[],
|
|
)
|