import type { SystemInfoConfig } from './types'
export const mailConfig: SystemInfoConfig = {
title: 'Unified Inbox System-Info',
description: 'E-Mail-Management mit KI-Analyse und Automatisierung.',
version: '1.0',
architecture: {
layers: [
{ title: 'Inbox UI', components: ['Mail List', 'Compose', 'AI Summary'], color: '#3b82f6' },
{ title: 'Mail Service', components: ['IMAP Sync', 'SMTP Send', 'Parser'], color: '#8b5cf6' },
{ title: 'AI Pipeline', components: ['Classification', 'Summarization', 'Response Draft'], color: '#10b981' },
{ title: 'Storage', components: ['PostgreSQL', 'MinIO (Attachments)', 'Vector DB'], color: '#f59e0b' },
],
},
features: [
{ name: 'Multi-Account Support', status: 'active', description: 'Mehrere E-Mail-Konten' },
{ name: 'KI-Zusammenfassung', status: 'planned', description: 'Automatische E-Mail-Zusammenfassung' },
{ name: 'Smart Categorization', status: 'planned', description: 'KI-basierte Kategorisierung' },
{ name: 'Response Suggestions', status: 'planned', description: 'Antwort-Vorschlaege' },
],
roadmap: [
{ phase: 'Phase 1: Core (Q1)', priority: 'high', items: ['IMAP/SMTP Integration', 'Multi-Account', 'Search', 'Attachments'] },
{ phase: 'Phase 2: AI (Q2)', priority: 'high', items: ['E-Mail Classification', 'Priority Detection', 'Sentiment Analysis', 'Spam Detection'] },
{ phase: 'Phase 3: Automation (Q3)', priority: 'medium', items: ['Auto-Responses', 'Rules Engine', 'Workflow Triggers', 'CRM Integration'] },
],
technicalDetails: [
{ component: 'IMAP', technology: 'imaplib/imapclient', description: 'E-Mail Empfang' },
{ component: 'SMTP', technology: 'smtplib', description: 'E-Mail Versand' },
{ component: 'AI', technology: 'OpenAI GPT-4', description: 'Text Analysis' },
{ component: 'Search', technology: 'PostgreSQL FTS', description: 'Volltextsuche' },
],
auditInfo: [
{
category: 'E-Mail Konten',
items: [
{ label: 'Konfigurierte Konten', value: 'Variabel', status: 'ok' },
{ label: 'IMAP Sync', value: 'Aktiviert', status: 'ok' },
{ label: 'SMTP Versand', value: 'Aktiviert', status: 'ok' },
{ label: 'OAuth2 Support', value: 'Google, Microsoft', status: 'ok' },
],
},
{
category: 'Sicherheit',
items: [
{ label: 'Verschluesselung', value: 'TLS Required', status: 'ok' },
{ label: 'Credential Storage', value: 'Encrypted', status: 'ok' },
{ label: 'Spam-Filter', value: 'SpamAssassin', status: 'ok' },
{ label: 'Virus-Scan', value: 'ClamAV', status: 'ok' },
],
},
{
category: 'KI-Features',
items: [
{ label: 'Kategorisierung', value: 'Geplant', status: 'warning' },
{ label: 'Zusammenfassung', value: 'Geplant', status: 'warning' },
{ label: 'Antwort-Vorschlaege', value: 'Geplant', status: 'warning' },
{ label: 'Sentiment Analysis', value: 'Geplant', status: 'warning' },
],
},
],
fullDocumentation: `
Unified Inbox - E-Mail Management
1. Uebersicht
Der Unified Inbox aggregiert E-Mails aus mehreren Konten in einer zentralen Oberflaeche. Geplant ist die Integration von KI-Features fuer automatische Kategorisierung und Zusammenfassung.
2. Architektur
┌─────────────────────────────────────────────────────────────────────┐
│ Unified Inbox UI │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────────┐ │
│ │ Inbox │ │ Compose │ │ AI Summary (planned) │ │
│ └──────────────┘ └──────────────┘ └──────────────────────────┘ │
└─────────────────────────────┬───────────────────────────────────────┘
│
v
┌─────────────────────────────────────────────────────────────────────┐
│ Mail Service │
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
│ │ IMAP Sync │ │ SMTP Send │ │ Parser │ │ AI Pipeline│ │
│ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │
└─────────────────────────────┬───────────────────────────────────────┘
│
┌───────────────────┴───────────────────┐
│ │
v v
┌─────────────────────────┐ ┌─────────────────────────┐
│ External Mail │ │ Internal Storage │
│ ├── Gmail │ │ ├── PostgreSQL │
│ ├── Outlook │ │ ├── MinIO (Attachments)│
│ └── Custom IMAP │ │ └── Qdrant (Embeddings)│
└─────────────────────────┘ └─────────────────────────┘
3. Unterstuetzte Provider
| Provider | Auth-Methode | Features |
| Gmail | OAuth2 | Labels, Push-Sync |
| Outlook/365 | OAuth2 | Folders, Categories |
| Custom IMAP | User/Pass | Standard IMAP |
| Exchange | OAuth2/EWS | Geplant |
4. API Endpoints
| Endpoint | Methode | Beschreibung |
| /api/mail/accounts | GET | Konfigurierte Konten |
| /api/mail/accounts | POST | Konto hinzufuegen |
| /api/mail/messages | GET | E-Mails abrufen |
| /api/mail/messages | POST | E-Mail senden |
| /api/mail/messages/{id} | GET | E-Mail-Details |
| /api/mail/sync | POST | Manueller Sync |
5. Sync-Strategie
Initial Sync
│
v
┌───────────────────────────────────────┐
│ 1. Fetch Folder Structure │
│ 2. Sync Last 30 Days │
│ 3. Index Messages │
│ 4. Generate Embeddings (optional) │
└─────────────────┬─────────────────────┘
│
v
Incremental Sync (alle 5 Min)
│
v
┌───────────────────────────────────────┐
│ 1. Check for new Messages (IDLE) │
│ 2. Fetch new Messages │
│ 3. Update Index │
│ 4. Process AI Pipeline │
└───────────────────────────────────────┘
6. Sicherheit
- Credentials: AES-256 verschluesselt in DB
- OAuth Tokens: Refresh Token rotiert
- Transport: TLS 1.2+ required
- Attachments: Virus-Scan vor Speicherung
- Spam: SpamAssassin Score-basiert
7. Datenschutz
| Aspekt | Massnahme |
| E-Mail-Inhalte | Lokal gespeichert, nicht an Dritte |
| KI-Verarbeitung | Opt-in, PII-Filterung |
| Retention | Spiegelt Provider-Einstellung |
| Loeschung | Sync mit Provider |
`,
}