Commit Graph
241 Commits
Author SHA1 Message Date
Matthew Meszaros a79a196912 feat: add Warmbly for Agencies with a separate agency view, agency accounts, a shared monthly send pool, a shared agency AI balance with per-client caps and transfers, agency billing and top-ups, agency API keys across clients, client mailbox connect links and shareable and scheduled client reports served by a separate portal service on portal domains, white-label branding with a branded client dashboard on agency portal domains and website embeds, copy campaigns and templates across workspaces, and a cross-client inbox 2026-11-10 08:31:31 +01:00
Matthew Meszaros 8575bce7ca feat: make the Partnership plan Cloud-only by removing instance self-execution, and add the Partnership mailbox connect API (SMTP/IMAP with warmup, one-sign-in OAuth grant handoff, sign-in links), workspace-owned Google and Microsoft OAuth apps refreshed on the backend, Partnership access to placement tests and API keys, and the Partnership guide 2026-11-09 15:58:47 +01:00
Matthew Meszaros 3cf3c772ba feat: stop reporting RESOURCE_NOT_FOUND from the worker to error tracking, since a folder or message gone from the server is absorbed by the folder walk re-listing and still relayed to the consumer 2026-11-08 10:20:15 +01:00
Matthew Meszaros 24b978d2bb feat: ask whole-domain grant Gmail mailboxes to watch the push topic only when the delegation key belongs to the topic's project, and report each mailbox's first failed watch or Graph subscription to error tracking 2026-11-08 07:38:35 +01:00
Matthew Meszaros 3cb29c7909 Merge remote-tracking branch 'origin/main' into fix/1157-log-silent-sync-drops 2026-11-07 11:58:32 +01:00
Matthew Meszaros b8806a5ed5 feat: suppress a bounced address only on clear invalid-recipient evidence by letting the enhanced status beat weak recipient wording in dsn.Blame, adding block markers, quoting the sanitized SMTP server reply in send failures, reading the quoted reply from status-less failure notices, ignoring caller-supplied bounce causes, keeping unclassified bounces off the suppression list, and counting only address bounces as hard bounces in warmup and worker health 2026-11-07 11:01:54 +01:00
Matthew Meszaros 4ede5e0914 feat: look up Gmail warmup messages with FindUIDInFolder, which reports a failed SELECT as an error so the rescue hands the action to the Gmail API instead of recording it as already out of spam 2026-11-07 08:27:47 +01:00
Matthew Meszaros 568df446b6 Merge remote-tracking branch 'origin/main' into feat/google-trusted-app-signin 2026-11-07 07:30:50 +01:00
Matthew Meszaros ba07007fc0 feat: hand Gmail warmup engagement that fails over IMAP to the Gmail API (resolving the Gmail id when needed) and retry IMAP six hours after a refusal the worker saw, keep a vendor consent pending or settled across cache errors and racing callbacks, refuse a personal Gmail address at the end of Google sign-in, let a domain whose Google mailboxes arrived in a workspace import make its grant again, offer Google reconnects only where the instance has a Google client, batch bulk vendor reconnects by 1000, and confirm before discarding a typed app password 2026-11-07 07:25:24 +01:00
Matthew Meszaros dea6692dde feat: record the scopes Google granted each mailbox token (email_accounts_oauth.granted_scopes, migration 000357) at connect, reauth and vendor convert, list only Google sign-ins without full mail access as retiring with the vendor that can reconnect them, tell workers through ADD_EMAIL full_mail_access to skip Gmail IMAP for a token known to lack it, let an app password take over a delegated Google mailbox after the worker check, add GET /emails/:id/signin with only the switches that can succeed, record vendor reconnect progress per mailbox on the audit spine, and reconnect vendor-linked Google mailboxes automatically behind mailbox_signin.auto_vendor_reconnect with one attempt in flight and a week between attempts 2026-11-07 05:20:33 +01:00
Matthew Meszaros 1db1ea0835 feat: request https://mail.google.com/ for new Google sign-in mailboxes (reauth still accepts gmail.modify) and run Gmail warmup engagement (spam rescue, mark read, star, mark important) over imap.gmail.com with the mailbox's own token, including delegated mailboxes through an optional mail.google.com delegation scope minted via ?purpose=imap on the internal token route, falling back per mailbox to the Gmail API when the scope or IMAP access is missing, with docs for scopes, warmup and existing delegation entries 2026-11-07 05:20:23 +01:00
Matthew Meszaros a22d15efd6 Merge remote-tracking branch 'origin/main' into devin/template-warmup 2026-11-07 05:18:49 +01:00
Matthew Meszaros 6c73120bc6 feat: classify Gmail's [ALERT] Invalid credentials as the credentials refusal for the mailbox's auth kind and an IMAP TRYCREATE on a sync command as a missing folder, and stop reporting GOOGLE_AUTHENTICATION_FAILED and INVALID_CREDENTIALS from the worker to PostHog since the relay already deactivates the mailbox and tells its owner 2026-11-06 18:40:25 +01:00
Matthew Meszaros 73f1e5dbb7 feat: accept invitations whose inviter was deleted, hand another workspace's subscription to its owner on account deletion, refuse it over shared assistant conversations, recheck refused account deletions daily, and show only the public sentence of a sensitive migration connection error 2026-11-06 17:09:55 +01:00
Matthew Meszaros 4ed928e79b feat: name an undecodable Graph success body as msgraph.ErrUnreadableResponse and keep it out of worker error reports, so the pass retries without fabricating a server-unreachable event 2026-11-06 16:24:28 +01:00
Matthew Meszaros 9bbf149548 feat: warm up running campaign copy: each mailbox's warmup draws the opening steps and active A/B arms of the campaigns it sends for, rendered per pool recipient through the campaign renderer (merge fields, spintax, HTML, signature, opt-out, UTM) and refused when a step needs lead-only data, with per-step placement at GET /warmup/templates/campaign-copy, a campaign_copy setting, a 7-day mailbox maturity gate, big-three headline placement, a sender-only template resend check, lock_timeout and a concurrent org index 2026-11-05 18:24:43 +01:00
Matthew Meszaros fd11313a04 feat: clear the Graph relay cache entry before relaying a known message and cache a reconcile only when its resolved folder matches the walked folder 2026-11-05 14:21:35 +01:00
Matthew Meszaros 465493d1dc feat: record in the Graph relay cache the read state a message reconcile actually relayed and clear it when the reconcile reports a removal, so a later delta walk compares against what the platform last received 2026-11-05 14:07:02 +01:00
Matthew Meszaros 6a5f5ecb56 feat: relay an Outlook known message's read state and folder from the Graph delta walk only when it differs from what the worker relayed within the last six hours, forgetting the entry when the message is removed 2026-11-05 13:53:06 +01:00
Jaseem ThayalandClaude Opus 5.5 f04d2a1bad fix: log silent IMAP publish failures and dropped sync state reports (#1157)
Two paths left last_synced_at stale with nothing in the logs, which is
what shows as "No recent successful sync check":

- The IMAP pass ended with nil when a MAILBOX_UPDATE, MAILBOX_DELETE or
  MAILBOX_RENAME publish failed. Those five sites now go through
  controlPlaneError, the helper the rest of the pass already uses for
  publish failures: it logs a warning with email_id and the error and
  emits ControlPlaneHeld evidence. It still returns nil and holds cursors.
- HandleSyncState returned nil without a word when PutFromWorker rejected
  a report because the worker or transport generation no longer matched.
  It now logs a warning with email_id, worker_id, report_generation and
  transport_generation, and still returns nil.

Logging only, no behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 14:08:17 +05:30
Matthew Meszaros 78e42be41f feat: validate bounded campaign attachment formats and UTF-8 imports while preserving portable existing files 2026-11-04 20:22:57 +01:00
Matthew Meszaros 56c3195f4b feat: never adopt a stored push channel this worker already closed, matching the Graph subscription id or a Gmail watch no newer than the closed one, and test the pending push report resend during the retry backoff 2026-11-04 17:18:20 +01:00
Matthew Meszaros 710d857a4b feat: keep an unsent mailbox push report ahead of the control plane's stored row and resend it during the retry backoff, and plan-test the largest accepted fleet worker capacity 2026-11-04 16:58:54 +01:00
Matthew Meszaros a7721887a8 feat: wake a Gmail mailbox once its push channel is stored, resend a PUSH_STATE the bus refused and report a Graph subscription that was deleted or gone even when its replacement fails, follow Graph subscription list continuations, drain a wake the timed pass covers, bound SYNC_WAKE publishes by the caller's deadline, keep the Google service account out of the compose worker, and correct the mailbox push docs on the Gmail publisher principal, what GMAIL_PUSH_TOPIC alone does, poll intervals and who calls the push routes 2026-11-04 16:32:27 +01:00
Matthew Meszaros 095d842aa9 feat: merge main into the mailbox push branch and renumber its migration to 000341_mailbox_push_channels after main took 000339 and 000340 2026-11-04 11:40:14 +01:00
Matthew Meszaros f9b8fa2255 feat: scale the AWS worker fleet on worker memory and CPU instead of mailbox count, publish WorkerMemoryPercent and WorkerMemoryMaxPercent from heartbeats, and let WARMBLY_WORKER_CAPACITY=auto size each worker's mailbox target from its measured memory 2026-11-03 18:11:18 +01:00
Matthew Meszaros 15541eafe6 Merge pull request #1141 from warmbly/fix/smtp-host-pacing
feat: pace SMTP sessions to a server that is limiting the worker's address
2026-11-03 17:00:28 +00:00
Matthew Meszaros 03cd541c62 feat: pace SMTP sessions per server and worker address after a 421, a 454 sign-in refusal or a dropped STARTTLS, hold due sends without contacting the server, and walk those sends back without spending a lead attempt or raising a mailbox error 2026-11-03 16:59:57 +01:00
Matthew Meszaros 074018cf00 Merge remote-tracking branch 'origin/main' into fix/mailbox-warmup-errors 2026-11-03 16:01:12 +01:00
Matthew Meszaros d241a836f8 feat: sync mailboxes in realtime through Graph change notifications, Gmail Pub/Sub watches and IMAP IDLE that wake the owning worker with SYNC_WAKE, drain stored arrivals continuously, and add an opt-in autoscaling AWS worker fleet without public IPv4 scaled on a published fleet utilization metric 2026-11-03 15:11:24 +01:00
Matthew Meszaros d1b717cc06 feat: fence worker sync reports by the transport generation each worker incarnation was loaded with, carried as report_generation on SYNC_STATE 2026-11-03 09:15:40 +01:00
Matthew Meszaros d1ae1e2e32 feat: decide bounce suppression from the DSN status code and server reply through a shared dsn.Blame rule so mailbox-full, policy, reputation and system bounces keep the address and lead while address-invalid ones suppress, carry the per-recipient status and diagnostic in inbound bounce reasons, reuse the rule in emailverify, and add an optional TYPESAFE_ENDPOINT 2026-11-03 08:31:36 +01:00
Matthew Meszaros 2da3e7d299 feat: fence identified mailbox sync reports against current worker assignments and verify password-only reauthentication recovery 2026-11-03 08:17:16 +01:00
Matthew Meszaros a2f0f99a3d feat: order mailbox folder coverage independently of completed syncs and retain password confirmation for used authenticator steps 2026-11-03 07:02:39 +01:00
Matthew Meszaros 81d1a95b98 feat: add the admin-offered $90 Partnership plan with server-priced offer checkout, an admin-granted credential-free Cloud warmup mode where a linked instance keeps every mailbox credential and executes Cloud-planned warmup sends and engagement from a sealed per-link command queue, and Cloud verification of instance reports through recipient-bound arrivals, receiver-proven sends, a placement cross-check reporter-trust audit, liveness, expiry and revocation 2026-10-26 17:49:32 +01:00
Matthew Meszaros 4a709b6573 feat: log a warning instead of refusing node join and env when the hosted backend URL is not HTTPS, use structured logging for legacy node tokens, point the avatar URL example at the public object route, and add tests for public object headers, hosted webhook dial refusal and tampered or foreign-key send decryption 2026-10-26 07:48:36 +01:00
Matthew MeszarosandDevin AI 79baf46462 feat: keep SMTP mailboxes executable through retryable IMAP startup failures and enforce provider login cooldowns
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-25 07:44:19 +00:00
Matthew Meszaros 3532039037 feat: explain each refused mailbox connection in plain words with what to do (a host on a private network address, sign-in offered only unencrypted, no STARTTLS, no supported AUTH mechanism, an unverified or unpinned certificate, a send whose content could not be decrypted) in the connection test, stored mailbox errors and import causes, add an optional reason to API error responses with certificate_untrusted on mailbox_tls_failed for the dashboard's trust option, and treat tls_unverified and tls_pin as post-fixture fields in the Avro envelope test 2026-10-23 19:52:54 +02:00
Matthew Meszaros 03fd30f9bc feat: merge decoded-byte image validation with download-safe serving, own-domain form and domain redirects, TLS-only SMTP AUTH negotiation and pinned per-server certificate opt-outs, with MAIL_TLS_INSECURE honoured on self-hosted and development instances and resolved by the control plane for joining nodes 2026-10-23 16:20:30 +02:00
Matthew Meszaros 4624cc4a74 feat: negotiate mailbox SMTP AUTH by link (LOGIN then PLAIN only over TLS or loopback, CRAM-MD5 last, never a password mechanism in cleartext) for the send path, the connection test and the platform relay, honour MAIL_TLS_INSECURE only under APP_ENV=dev, and trust a mailbox server whose owner opted out of CA verification only on its pinned SPKI SHA-256 via VerifyConnection, reporting TLS_CERTIFICATE_CHANGED or TLS_CERTIFICATE_UNCONFIRMED as retryable connection errors 2026-10-23 16:15:55 +02:00
Matthew Meszaros 60cef7bcdc feat: return one uniform decrypt error from the org cipher and the instance encrypter for malformed, short, tampered or foreign-key ciphertext, and answer a send whose subject or body cannot be decrypted or whose workspace key cannot be loaded with EMAIL_FAILED and a fixed reason through failSend, logging only the failure class and never sending 2026-10-23 16:07:55 +02:00
Matthew Meszaros 3f13636a5b feat: decide uploaded image formats from their decoded bytes through internal/pkg/imagetype for avatars, OAuth logos, form assets, email images and archive-restored public objects, store public objects with inline headers only for PNG/JPEG/GIF/WebP, sign every presigned attachment and node GET URL with forced download disposition and a safe response content type, and rasterize SVG previews to PNG in the dashboard image client 2026-10-23 15:43:42 +02:00
Matthew Meszaros 19c7eb13dc Merge pull request #1030 from warmbly/feat/mailbox-credentials-org-dek
feat: seal mailbox credentials under KMS-protected workspace keys
2026-10-22 17:46:26 +00:00
Matthew Meszaros 219f428208 feat: store each warmup receipt's placement group and host at arrival so rescue outcomes land on the same placement row, leave rescues that never ran unreported instead of failed, and label rescue outcomes as confirmed out of spam with a wrapping summary in the mailbox placement tab 2026-10-22 19:11:28 +02:00
Matthew Meszaros 2f42afa78f feat: report each warmup spam rescue's outcome from the recipient worker into placement history and the mailbox placement tab, rescue only mail that arrived in spam, and follow bounded Graph continuations when resolving warmup messages by Message-ID 2026-10-22 19:11:28 +02:00
Matthew Meszaros 03170c5482 feat: share one cancellation-proof bounded DEK lookup per organization, bound worker token sealing, reseal empty mailbox credential values, refuse an invalid MAILBOX_CREDENTIALS_SEALING in warmblyctl, keep credential exports gated on the instance key and log workspace-key failures in mailbox erasure 2026-10-22 19:11:23 +02:00
Matthew Meszaros 537a622409 feat: seal mailbox SMTP/IMAP logins and OAuth tokens under KMS-protected workspace DEKs behind MAILBOX_CREDENTIALS_SEALING, carry them sealed in ADD_EMAIL and token refreshes, reseal stored credentials in a resumable consumer job, and cache DEKs in process with singleflight in front of Redis and KMS 2026-10-22 19:11:23 +02:00
Devin AI 5ee2049ab4 feat: resolve Graph complaint MIME before writing an arrival body so temporary provider failures cannot accumulate orphaned blobs 2026-10-19 06:20:52 +00:00
Devin AI a2e81c2ef5 feat: keep Graph complaint reports retryable across temporary raw message failures and bound MIME depth, parts and decoded content before admitting an arrival 2026-10-19 06:19:42 +00:00
555aaditya 3386052ce8 feat: detect spam-complaint feedback reports on Microsoft Graph mailboxes by reading the report parts from the message's raw MIME when the synced rendered body cannot name the send, and drop the deliverability docs callout saying Graph complaints are not detected 2026-10-19 01:52:36 +05:30