Repository navigation
FeedCourier v0.2.0
Breaking Changes
- Two-Layer Delivery Channel Model (
Channel Account+ MultipleDestinations):- Split delivery channels into a Channel Account (
channels— storing encrypted account credentials, outbound proxy toggle, shared pacing/jitter, rolling hourly/daily quotas, and shared cooldowns) and one or more child Destinations (channel_destinations— storing independently encrypted Telegramchat_id/message_thread_id, SMTPto_addresses/reply_to, or Notiondata_source_id/column_mapping, each with its own enable toggle and connectivity test). - Automatic Atomic SQLite Migration & Pure Pre-DDL Backup: On first startup against an existing
v0.1.xdatabase,Database::connectcreates a consistent onlineVACUUM INTOsnapshot at<DATA_DIR>/pre-v0.2.0-backup.dbbeforemigrations/0002_channel_destinations.sqlruns—producing a purev0.1.xSQLite snapshot compatible with rolling back directly tov0.1.6(if a backup already exists, a UTC-timestampedpre-v0.2.0-backup-<timestamp>.dbfile is written without overwriting it).Database::migrate_channels_to_v2then splits all pre-v0.2.0 channels inside a single SQLite transaction: legacy SMTP rows merge only whenhost,port,username,password,security, andfrom_addressall match, SMTPcredential_group_keyincludes the password SHA-256 digest (keeping distinct API keys under a shared username such as SendGrid'sapikeyisolated), merged quotas/pacing/cooldown/proxy are aggregated from enabled legacy channels (falling back to all rows only when every merged channel is disabled), trailing 24-hour deliveries are backfilled intodelivery_quota_ledger, allroutesanddelivery_tasks(includingdeliveredanddead_letterhistory) are repointed with a post-migrationdestination_id IS NOT NULLintegrity check, andsystem_settings.channel_model_version = 2is recorded for idempotency. - Telegram Bot API SSRF Enforcement (Upgrade Note for Local Bot API Servers): All Telegram Bot API requests—including official
https://api.telegram.organd customapi_base_url/ self-hosted Local Bot API servers—now enforce connect-timeSsrfPolicyDNS validation (sharing the hot-reloadableSSRF_ALLOWLIST) with automatic redirects disabled, andapi_base_urlonly allowshttp/httpsURLs without userinfo, query, or fragment (SSRF denials return403 ssrf_blocked). Existing internal Local Bot API endpoints are not auto-allowlisted: operators running a Local Bot API server on a private/loopback/Docker address must explicitly add its hostname or IP/CIDR toSSRF_ALLOWLIST. - Shared Account-Level Rate Limiting & Persistent Quota Ledger (
delivery_quota_ledger): Minimum interval, random jitter, rolling hourly/daily quotas, and upstream429cooldowns are enforced across all destinations belonging to the same Channel Account and any sibling accounts sharingcredential_group_key(applying the strictest effective quota across the group). Rolling 1h/24h quota counts andlast_completed_atpacing timestamps are stored in the newdelivery_quota_ledgertable (without business foreign keys, pruned after 24 hours), so deleting feeds, routes, or destinations—or clearing feed cache—never resets quota usage or pacing timestamps. - REST API & MCP Destination Targeting: Route creation/updates (
POST/PATCH /api/v1/routes, MCPconfigure_route) and debug pushes (POST /api/v1/feeds/preview/push, MCPtest_push_feed_entry) now takedestination_idas the primary target. Legacychannel_idpayloads remain accepted when the account owns exactly one destination and return a validation error when multiple destinations exist. Added/api/v1/channels/{id}/destinations,/api/v1/destinations/{id}, and/api/v1/destinations/{id}/test;POST /api/v1/channels/{id}/testnow verifies account credentials whendestination_idis omitted.
- Split delivery channels into a Channel Account (
Added
- Auto-Fetched Account & Destination Default Names: Leaving the display name blank when creating a Channel Account or Destination automatically derives it from Telegram
getMe(@username) /getChat(group or channel title), SMTPfrom_address/ first recipient address, or Notion/v1/users/meintegration name / database title. - Per-Route Timezone Override (
RouteOptions.timezone): Routes now accept an optional IANA timezone (e.g.,Asia/Shanghai,America/New_York) that overrides the system timezone for that route's delivery time windows/weekdays, SMTP email article timestamps, and Telegram rich-message<footer>timestamps—formatted with explicit UTC offsets such as2026-11-08 11:00 (UTC+08:00). Configurable in the WebUI route editor, REST API, debug push, and MCP (configure_route,test_push_feed_entry). - Feeds List Tag Filter, Persistent Sort & Pagination: Narrowed the Feeds search box to feed title and URL; added a single-select Tag filter dropdown (with per-tag counts and an Untagged option), a persistent Sort control (added time or
Intl.CollatorCJK/Latin-aware title, ascending/descending), and 15 / 30 / 50 per-page pagination persisted inlocalStorage. - Channels & Routes Page Filters: Added a Channel Kind filter (
All/Telegram/SMTP/Notion) to the Channels view and cascading Channel Kind → Account filters to the Routes view. - Semantic Outbox Queue Status Colors: Standardized Outbox badges, HTTP/SMTP status codes, attempt-count escalation (
1neutral,≥ 2amber, maxed red), and status-matched diagnostic log text so successful delivery logs no longer render in red.
Changed
- Telegram Rich Message Typography (
telegram-rich 0.0.2): Upgraded totelegram-rich 0.0.2and refinedrich_messagelayout—demoting article titles from<h1>to<h2>, movingSource · Author · Localized Publish Timeinto a native Telegram<footer>below the title, inserting an<hr>divider before the body, enablingheading_offset = 2(h1→h3,h2→h4, …, up toh6), and enablinggroup_consecutive_media = trueto merge 2+ consecutive images into<tg-collage>(or<tg-slideshow>when exceeding collage limits). - Redacted MCP Destinations Discovery (
list_feeds_status): Exposed secret-freedestinationssummaries (id,channel_id,name,kind,enabled) both nested under each channel and as a top-level list without ever leaking credentials, email addresses,chat_id, ordata_source_id;inspect_failed_deliveriesnow includesdestination_idanddestination_name. - Pacing & Jitter Documentation: Clarified that random jitter (
0..=jitter_max_secs) is sampled independently after every delivered task (never shared across a batch) and held in memory only (after a restart, the first delivery enforcesmin_interval_secsfrom SQLitedelivery_quota_ledgerlast_completed_at). - In-Flight Task Synchronization on Route Updates (
PATCH /api/v1/routes/{id}, MCPconfigure_route): Changing a route's target destination atomically repoints pendingqueued,deferred, andretryingtasks to the newdestination_id(clearingcheckpoint_jsonand resettingattempt_count = 0, while leaving activedeliveringtasks untouched). Changingactive_windows,active_weekdays, ortimezoneimmediately resetsnext_attempt_at = nowonqueuedanddeferredtasks and wakes the outbox dispatcher. - Explicit SMTP Password Clearing (
PATCH /api/v1/channels/{id}): Omittingpasswordcontinues to preserve the existing encrypted SMTP password, while explicitly passing"password": nullclears an optional SMTP password.
Fixed
- DST-Safe Delivery Windows & Strict Equal-Boundary Validation (
src/schedule.rs): Handled Daylight Saving Time transitions cleanly—spring-forward gaps clamp window boundaries forward to the first valid local instant, and fall-back ambiguous intervals use the earliest occurrence for window starts and the latest occurrence for window ends. Restricted all-day equal-boundary windows strictly to00:00–00:00(or an emptyactive_windowslist), rejecting any otherstart == endwindow with400 Bad Request. - SMTP Responsive Images, Figures, Tables & Code Blocks (
src/channels/smtp.rs): Rewrote<img>tags in email bodies with Outlook-compatiblewidth="592"(preserving explicitly narrower widths and relative percentage widths), stripped fixedheightattributes, and added responsive inline CSS (max-width:100%;height:auto) alongside<figure>/<figcaption>,<table>, and<pre>width/overflow rules and<head>CSS fallbacks so wide feed images and tables no longer overflow the640pxemail card.
What's Changed
Maintenance & Dependencies
- feat(release): v0.2.0 - two-layer channels, rich typography, WebUI upgrades, and security hardening by @ElleryHe in #23
Full Changelog: v0.1.6...v0.2.0