- Removed restore logic from imap_sync_account and imap_sync_folder
- Soft-deleted mails are now skipped during sync (not touched, not restored)
- This prevents deleted mails from reappearing when they are found on IMAP
- The sync queue handles retrying failed IMAP deletes
- imap_sync_folder now searches only UID > max_known_uid instead of ALL
- First sync gets last 50, subsequent syncs only get new mails
- UI loads cached mails immediately from DB, sync runs in background
- Folder counts updated after sync
- New imap_sync_folder function: syncs single folder quickly for live use
- New POST /mail/folders/{folder_id}/sync route
- Frontend: syncFolder API + called on every folder selection
- Auto-sync interval reduced from 300s to 60s
- Sent mail IMAP APPEND already uploads full body via msg.as_bytes()
- imap_delete_mail: use stored imap_uid instead of Message-ID search, raise on failure
- imap_move_mail: same imap_uid fix, raise on failure
- New MailSyncQueue model + migration 0007 for pending IMAP operations
- delete_mail route: queues failed IMAP delete for retry
- move_mail route: queues failed IMAP move for retry
- process_sync_queue: retries pending delete/move operations in auto-sync loop
- Auto-sync loop: processes sync queue before pulling new mails
- Restore soft-deleted mails if they still exist on IMAP server during sync
- Upload sent mails to IMAP Sent folder via APPEND after SMTP send
- Plugin version bumped to 1.2.0
- Mail list: title and subject font text-xs -> text-sm
- Remove Termin (create-event) toolbar button
- Rename Flagge -> Markierung with select dropdown (star, flag, bookmark, important, question)
- Backend: add flag_type column to Mail model + migration 0006
- Backend: flag_type in MailFlagsUpdate schema, update_flags route, mail_to_response
- Frontend: flag_type in Mail interface, FlagUpdatePayload, MailList symbol display
- Add imap_uid column + unique index for proper deduplication
- Use deterministic message_id for emails without Message-ID header
- Dedup by (account_id, folder_id, imap_uid) first, message_id fallback
- Track folder moves: update folder_id when email appears in different folder
- Fix Sent folder lookup: check Sent/INBOX.Sent/Sent Items/Sent Mail + ILIKE
- Detect IMAP delimiter from LIST response instead of hardcoding dot
- Use detected delimiter in stale folder name migration
- Migration 0004_imap_uid.sql with imap_uid column and unique index
- Add _decode_mime_filename() helper with Q-encoding fallback decoder
- Use helper for both new and existing email attachment saving
- Handles edge cases where email.header.decode_header fails on partially processed filenames
- Decode =?utf-8?q?...?= filenames before sanitizing for both new and existing emails
- Prevents filenames like __utf-8_q_Wire_236095209372_2Epdf_2Ehtml__
- Uses email.header.decode_header + make_header for proper decoding
- IMAP sync now saves attachments for existing emails that have has_attachments=true
but no attachment records in the database (retroactive attachment saving)
- Replace silent exception catching with logger.warning for attachment save failures
- Add logging module import and logger instance
- This fixes the issue where 62 emails had has_attachments=true but 0 attachment records
- Fix sync error: backend returns {synced, error?} not {success, synced_count}; frontend now checks error field
- Decode MIME encoded-words (=?UTF-8?Q?...?=) in backend during IMAP sync for subject/from/to/cc headers
- Add frontend decodeMimeHeader() utility for already-stored encoded subjects (MailList + MailDetail)
- Make pagination sticky at bottom of mail list (flex-col h-full, ul scrolls, pagination flex-shrink-0)
- Make pagination compact: smaller padding (px-1.5 py-0.5), text-xs, smaller icons, tighter spacing
- Fix FlagUpdatePayload field names to match backend schema (is_seen/is_flagged)
- Replace dangerouslySetInnerHTML with sandboxed iframe (srcDoc, sandbox="")
- Add bulk mark read/unread with checkbox selection in MailList
- Add floating bulk action bar in Mail.tsx
- Add imap_sync_mail_flags() to push Seen/Flagged flags to IMAP server
- Call IMAP flag sync in PATCH /flags endpoint
- Add i18n keys for bulk actions (de/en)