• v1.0.1 98b54fe360

    thomass released this 2026-01-23 22:44:59 +01:00 | 1 commits to main since this release

    Bug Fixes

    Critical Fix

    • Fixed orphaned labels/folders bug - Labels and folders with backslashes or quotes no longer become orphaned
      • Root cause: IMAP LIST response parser wasn't handling escaped characters
      • Solution: Updated regex pattern and added proper unescaping logic
      • Affects: Labels like test\name and test"name now work correctly

    Additional Fixes

    • BUG #2: Added email existence validation in move operations with debug logging
    • BUG #3: Removed confusing full_path from MCP folder responses
    • BUG #4: Documented UID behavior changes after email moves
    • BUG #5: Improved error messages for label removal operations
    • BUG #6: Made sort_by_date parameter case-insensitive
    • BUG #7: Consolidated non-ASCII validation (removed redundancy)
    • BUG #8: Added empty label name validation
    • BUG #9: Added date range validation in email search

    Testing

    • All 549 unit tests passing
    • All quality checks passing (mypy, ruff)
    • Live MCP integration testing confirmed fixes work correctly

    Files Changed

    • 17 files changed, +727/-22 lines
    • Added 11 new tests covering edge cases
    Downloads
  • v1.0.0 b82f47f023

    thomass released this 2026-01-17 18:19:56 +01:00 | 9 commits to main since this release

    Initial release of proton-mail-bridge-client.

    Added

    Email Operations

    • list_mails(folder, limit, offset, unread_only, sort_by_date, include_labels) - List emails with filtering and pagination
    • read_mail(email_id, folder) - Read full email content with proper encoding handling
    • send_mail(to, subject, body, cc, bcc, body_html) - Send emails via SMTP
    • delete_mail(email_id, folder, permanent) - Delete emails (move to Trash or permanent)
    • move_mail(email_id, source_folder, destination_folder) - Move emails between folders
    • find_emails(folder, subject, sender, recipient, since, before, unread_only, limit) - Search emails using IMAP SEARCH
    • get_email_by_message_id(message_id, folder) - Find email UID by Message-ID header
    • add_label(email_id, folder, label_name) - Add label to email
    • remove_label(email_id, label_name, folder) - Remove label from email

    Folder Management

    • list_folders() - List all mail folders
    • create_folder(name) - Create folders with automatic nested path creation
    • rename_folder(old_name, new_name) - Rename or move folders
    • delete_folder(name) - Delete custom folders (system folders protected)
    • folder_exists(name) - Check folder existence

    Label Management

    • list_labels() - List all user-created labels
    • create_label(name) - Create labels (flat structure)
    • rename_label(old_name, new_name) - Rename labels
    • delete_label(name) - Delete labels
    • label_exists(name) - Check label existence

    Connection & Configuration

    • Persistent IMAP/SMTP connections with automatic reconnection
    • Exponential backoff retry logic (1s, 2s, 4s delays)
    • Thread-safe connection access using RLock
    • Context manager pattern for automatic cleanup
    • Environment variable configuration support
    • SOPS-encrypted credential support (.env.sops)

    Data Models

    • Folder - Mail folder with metadata
    • EmailMetadata - Lightweight email headers for listing
    • Email - Full email content with plain text and HTML bodies

    Exception Hierarchy

    • ProtonMailBridgeError - Base exception
    • BridgeConnectionError, BridgeAuthenticationError, BridgeTimeoutError
    • SMTPConnectionError, SMTPAuthenticationError, SMTPTimeoutError
    • ConfigurationError, SOPSDecryptionError
    • FolderError, FolderNotFoundError, FolderAlreadyExistsError, InvalidFolderNameError
    • LabelError, LabelNotFoundError, LabelAlreadyExistsError, InvalidLabelNameError
    • EmailError, EmailNotFoundError, InvalidEmailFormatError, EmailSendError, EmailDeleteError, InvalidRecipientError

    Technical Details

    • 497 unit tests passing
    • Python 3.12-3.14 support
    • Zero external runtime dependencies (stdlib only)
    • Full type hints throughout codebase
    • Facade pattern with ProtonMailClient as single public interface

    Known Limitations

    • No attachment handling
    • No mark read/unread
    • No batch operations
    • No async support
    • Requires ProtonMail Bridge running locally
    Downloads