Skip to content

Raven MDA v0.2.0

Choose a tag to compare

@Aravinda-HWK Aravinda-HWK released this 24 Oct 04:49
39f0bc9

📧 Release Notes - Raven Mail Server v0.2.0

📅 Release Date: October 24, 2025

🎯 Overview

This release represents a major milestone for Raven Mail Server, introducing a complete LMTP delivery service and comprehensive IMAP command support. The system now provides end-to-end email handling with both delivery and access capabilities.


✨ What's New

📬 LMTP Delivery Service

Complete email delivery implementation that receives incoming emails and stores them in the database:

  • LMTP Server Implementation - RFC 2033 compliant Local Mail Transfer Protocol server

    • Unix socket support (/var/run/raven/lmtp.sock)
    • TCP socket support (port 24)
    • Multi-recipient delivery with per-recipient status responses
    • Configurable message size limits and timeouts
  • Email Parser - Full MIME message parsing and storage

    • Header preservation with sequence ordering
    • Multipart message handling
    • Attachment support via blob storage
    • Message-ID generation
  • Storage Integration - Database operations for message delivery

    • Multi-domain support with on-demand domain creation
    • User and mailbox auto-provisioning
    • Quota checking and enforcement
    • Delivery tracking and logging
  • Postfix Integration - Seamless integration with MTA

    • Direct LMTP transport configuration
    • Virtual mailbox delivery support

🗄️ Database Architecture Migration

New unified database schema supporting both IMAP and delivery services:

  • Multi-domain and multi-user support
  • Normalized message storage with deduplication
  • Efficient header and MIME part storage
  • Mailbox message linking via junction table
  • Delivery tracking and audit logging
  • Outbound queue support for future SMTP functionality

📨 IMAP Command Implementations

Complete IMAP protocol support with comprehensive test coverage:

  • Mailbox Management

    • LIST - List mailboxes with RFC 3501 wildcard pattern support (#44)
    • LSUB - List subscribed mailboxes with hierarchy delimiters (#49)
    • SUBSCRIBE / UNSUBSCRIBE - Subscription management (#41, #42)
    • STATUS - Mailbox status retrieval (MESSAGES, RECENT, UNSEEN, etc.) (#50)
  • Message Operations

    • FETCH - Retrieve message content, headers, and metadata (#69)
    • SEARCH - Search messages with multiple criteria support (#68)
    • STORE - Modify message flags (\Seen, \Flagged, \Deleted, etc.) (#70)
    • COPY - Copy messages between mailboxes (#71)
    • UID - UID-based operations for all applicable commands (#72)
    • APPEND - Add new messages to mailboxes (#52)
  • Mailbox State Management

    • CHECK - Checkpoint mailbox state (#65)
    • CLOSE - Close selected mailbox and expunge deleted messages (#66)
    • EXPUNGE - Permanently remove deleted messages (#67)

🧪 Testing & Quality

  • Comprehensive test suite for all IMAP commands
  • Helper functions for test setup and data creation
  • Unit tests for delivery service components
  • CI/CD workflow for automated testing
  • Test coverage for edge cases and error handling

📚 Documentation

  • Updated README with clear architecture overview (#79)

    • System component descriptions (IMAP Server & Delivery Service)
    • Email flow diagrams (receiving and reading)
    • Configuration examples for both services
    • Postfix integration guide
    • Database structure documentation
  • Delivery Service Documentation

    • Configuration file reference
    • LMTP setup instructions
    • Integration examples

🏗️ Infrastructure

  • Dockerfile Updates - Build and run both IMAP and delivery services
  • CI/CD Enhancements - Automated testing and build workflows
  • Configuration Management - Separate config files for IMAP and delivery

🐛 Bug Fixes

  • Fixed draft message not being saved to server (#76)

⚠️ Breaking Changes

💾 Database Schema

The database schema has been completely redesigned. Migration required for existing installations:

  • Old single-user database format is no longer supported
  • New multi-domain, multi-user architecture
  • Messages now stored with MIME structure

Action Required: This is not backward compatible. Fresh installation recommended.

⚙️ Configuration

  • IMAP server now requires raven.yaml configuration
  • Delivery service requires separate delivery.yaml configuration
  • Docker volume mounts updated to include delivery config

📝 Configuration Examples

IMAP Server (raven.yaml)

domain: example.com
auth_server_url: https://auth.example.com/verify

Delivery Service (delivery.yaml)

lmtp:
  unix_socket: /var/run/raven/lmtp.sock
  tcp_address: 127.0.0.1:24
  max_size: 52428800  # 50MB

database:
path: data/mails.db

delivery:
default_folder: INBOX
allowed_domains:
- example.com


🐳 Docker Deployment

docker pull ghcr.io/lsflk/raven:latest
docker run -d --rm \
  --name raven \
  -p 143:143 -p 993:993 -p 24:24 \
  -v $(pwd)/config:/etc/raven \
  -v $(pwd)/data:/app/data \
  -v $(pwd)/certs:/certs \
  -v $(pwd)/delivery.yaml:/app/delivery.yaml \
  ghcr.io/lsflk/raven:latest

🔧 Technical Details

IMAP Commands Support Matrix

Command Status RFC Notes
CAPABILITY 3501 Full support
LOGIN 3501 With external auth
AUTHENTICATE 3501 PLAIN mechanism
STARTTLS 3501 TLS upgrade
LIST 3501 Wildcard patterns
LSUB 3501 Subscription filtering
SUBSCRIBE 3501 Mailbox subscriptions
UNSUBSCRIBE 3501 Remove subscriptions
CREATE 3501 Mailbox creation
DELETE 3501 Mailbox deletion
RENAME 3501 Mailbox renaming
SELECT 3501 Read-write selection
EXAMINE 3501 Read-only selection
STATUS 3501 All status items
FETCH 3501 All fetch items
SEARCH 3501 Multiple criteria
STORE 3501 Flag management
COPY 3501 Message copying
UID 3501 UID operations
APPEND 3501 Message upload
CHECK 3501 Checkpoint
CLOSE 3501 With expunge
EXPUNGE 3501 Delete permanently
NOOP 3501 Keep-alive
IDLE 2177 Push notifications
NAMESPACE 2342 Namespace support
UNSELECT 3691 Close without expunge

⚡ Performance

  • SQLite database with optimized indexes
  • Efficient MIME part storage with blob support
  • Message deduplication via junction tables
  • Prepared statement caching

🔐 Security

  • TLS/SSL support (IMAPS on port 993)
  • STARTTLS for secure upgrade (port 143)
  • External authentication server integration
  • Domain-based access control
  • Quota enforcement to prevent abuse

🚧 Known Limitations

  • Single database file (SQLite) - not suitable for distributed deployments
  • No built-in SMTP server (relies on external MTA like Postfix)
  • Authentication requires external auth server

📦 Upgrade Instructions

From v0.1.0

  1. Backup existing data (if applicable)
  2. Pull latest image: docker pull ghcr.io/lsflk/raven:latest
  3. Create delivery.yaml configuration file
  4. Update docker run command with new volume mounts
  5. Configure Postfix for LMTP delivery
  6. Restart container

Note: Database migration from v0.1.0 is not supported. This release requires a fresh database.

💬 Support & Documentation

  • Repository: https://github.com/LSFLK/raven
  • Documentation: /docs/README.md
  • Issues: https://github.com/LSFLK/raven/issues

📊 Full Changelog: v0.1.0...v0.2.0