~
supamail
v0.1 · MIT

Email sync, straight into
your Supabase.

Point it at any IMAP mailbox. Every message lands in Postgres so you can query email like any other table.

~/supamail $ supamail tail --status
[13:42:18]fastmail/federicoIDLEINBOX +0
[13:42:21]rackspace/billingSYNCINBOX → 12 new
[13:42:24]rackspace/billingDONE12 msgs · 312ms
[13:42:31]zoho/supportBACKOFFretry in 42s
[13:42:33]fastmail/federicoFETCHbody uid 48222
3 accounts184,221 messages mirroredoverall lag 12s

// query it

What it looks like in SQL.

Once your email is in Postgres, you can do anything with it. Agents, search, dashboards, alerts. Here are the queries I actually run.

~/supamail (main) $ psql $DATABASE_URL -f queries/recent.sql
-- recent messages
select m.internal_date, m.from_email, m.subject, m.flags
from imap_messages m
where m.deleted_in_provider = false
order by m.internal_date desc
limit 50;

-- full body when you need it
select m.subject, b.body_text, b.body_html, b.raw_bytes
from imap_messages m
join imap_message_bodies b on b.message_id = m.id
where m.id = '…';

-- sync health
select email_address, sync_state, sync_state_reason,
       priority_sync_lag_seconds, overall_sync_lag_seconds
from imap_accounts;

// or don't

Or pay me $5 and I'll do all that for you.

Same code. Same schema. Data still lands in your Supabase. The only thing different is I run the worker.

$5/ month
SUPAMAIL · HOSTED
Start free trial
  • Connect Supabase in one click. OAuth handshake, schema applied automatically. No psql.
  • Add mailboxes from a web form. Paste IMAP credentials, name the account, done.
  • I run the worker. Docker, retries, backoff, monitoring. You don't see any of it.
  • Unlimited mailboxes. Until you do something silly, in which case I'll email you.
  • Cancel anytime. Switch to self-host whenever. Your Supabase keeps every row.
7-day trial · no card up front60-second setup

Honest: I'm one person. The hosted version is a small Fly worker per customer. If five hundred of you sign up tomorrow I'm going to have a rough Tuesday. I would love that problem.

// who

FA

I built this because every AI email tool I wanted to use integrates with Gmail. Some with Outlook. None with Rackspace, which is what our company is on.

So I wrote the sync myself. Then I pulled it out of our app, stripped the proprietary bits, and put it on GitHub. If it saves you a few weekends, cool.

Federico