惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Google DeepMind News
Google DeepMind News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
MongoDB | Blog
MongoDB | Blog
U
Unit 42
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
G
Google Developers Blog
I
InfoQ
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
Jina AI
Jina AI
量子位
宝玉的分享
宝玉的分享
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 聂微东
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
美团技术团队
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Tailwind CSS Blog
博客园 - 司徒正美
博客园 - 叶小钗
Hugging Face - Blog
Hugging Face - Blog
P
Palo Alto Networks Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
Spread Privacy
Spread Privacy
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
Vercel News
Vercel News
Martin Fowler
Martin Fowler
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Forbes - Security
Forbes - Security
Attack and Defense Labs
Attack and Defense Labs
Google DeepMind News
Google DeepMind News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
P
Privacy International News Feed
G
GRAHAM CLULEY
The Last Watchdog
The Last Watchdog
C
Cyber Attacks, Cyber Crime and Cyber Security
AI
AI
V2EX - 技术
V2EX - 技术

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Land your AI agent's email in the inbox, not spam
Qasim · 2026-06-23 · via DEV Community

You give your AI agent a real mailbox, it sends its first batch of email, and half of it lands in spam. The agent did nothing wrong. The domain did — it's new, it has no sending history, and mailbox providers treat an unknown domain that suddenly sends volume the same way they treat a spammer. Deliverability is the work of proving the mail is really yours, sending at a pace providers trust, and watching the signals that say whether recipients want it.

An Agent Account sends from a domain you own, so its inbox placement is yours to manage like any other mail from your company. This post is a practical playbook for getting and keeping an agent in the inbox, from two angles: the HTTP API for your backend, and the Nylas CLI for the terminal. I work on the CLI, so the terminal commands below are the ones I reach for when I'm wiring up monitoring.

The deliverability checklist

Five things decide whether an Agent Account reaches the inbox, and you can act on all of them before sending at volume. Work them in order — authentication first, because nothing else matters if recipient servers can't confirm the mail is yours, then pace and monitoring once mail is flowing.

  1. Authenticate the domain with DKIM and SPF as part of domain verification.
  2. Set up DMARC so providers know how to treat mail that fails authentication.
  3. Warm up a new domain before sending at volume, over roughly four weeks.
  4. Monitor bounces and complaints through the deliverability webhooks.
  5. Stay under the bounce and complaint thresholds that pause sending.

The rest of this post covers each one with the commands and request bodies to wire it up.

Authenticate with DKIM and SPF

Authentication is the foundation, and for an Agent Account it rides on two records you already publish during domain setup. DKIM adds a cryptographic signature proving the message wasn't altered and really came from your domain; SPF authorizes the sending infrastructure to send on your behalf. Both are verified before a custom domain can host accounts, so a verified Agent Account domain is already DKIM- and SPF-authenticated.

You can drive domain registration and verification from the CLI. nylas domains create registers the domain, nylas domains dns shows the records to publish, and nylas domains verify triggers verification once they propagate:

nylas domains create agents.yourcompany.com
nylas domains dns agents.yourcompany.com
nylas domains verify agents.yourcompany.com

The same flow runs over the Manage Domains API, which returns each record's host, type, and value to copy into your DNS provider. Verification usually succeeds within a few minutes, though DNS can take up to 24 hours depending on the record's TTL — the DNS setup guide walks through publishing the records at each provider. Once the domain is verified, DKIM and SPF are done — the one authentication layer left is DMARC, which you add yourself.

Set up DMARC in stages

DMARC tells receiving servers what to do when a message claiming to be from your domain fails authentication, and it reports who's sending as you. It builds on DKIM and SPF: a message passes DMARC when either one passes and aligns with the domain in the visible From address. Because an Agent Account signs with your domain's DKIM key and sends from your verified domain, alignment works as soon as you publish a DMARC record.

Roll it out in three stages so you never block legitimate mail before confirming everything authenticates. Add one TXT record at _dmarc.yourdomain.com, then tighten the policy over a few weeks as the reports come back clean:

v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com; pct=100

  1. Monitor with p=none. Mail is delivered normally, but providers send aggregate reports to your rua address so you can confirm your agent's mail authenticates and aligns.
  2. Quarantine with p=quarantine. Once reports look clean, send failing mail to spam. Ease in with pct=25 to apply the policy to a quarter of failing mail, then raise it to 100.
  3. Reject with p=reject. The end state, where receiving servers refuse mail that fails DMARC outright.

Give each stage a couple of weeks of clean reports before tightening. DMARC isn't part of domain verification — it's a separate record you manage in DNS, not through the API — but it's the most effective protection you can add against spoofing. Point the rua address at a mailbox or a monitoring service you actually check.

Warm up a new domain

A brand-new domain has no reputation, so a sudden burst of mail looks like spam and gets filtered. Warming up means raising volume gradually, over roughly four weeks, while real recipients open and reply. The reputation an Agent Account builds is tied to its domain, so warming matters most when you launch a new custom domain or split traffic across several — warm each one on its own schedule, since reputation doesn't transfer between domains.

This is a representative ramp toward a daily target of 500 to 1,000 messages, increasing 10 to 20 percent each day within a week:

Week Emails per day Notes
Week 1 5 to 15 Start very low, focus on highly engaged recipients
Week 2 30 to 75 Increase steadily
Week 3 150 to 300 Moderate volume
Week 4 500 to 1,000+ Full ramp to target

Two things matter as much as the numbers. Spread sends across business hours rather than firing them all at once, with a delay between messages to mimic natural patterns. And send only to recipients who expect the mail and will engage, because opens, clicks, and especially replies are the strongest positive signals you can generate. A send during warm-up is a normal Agent Account send — the same POST /v3/grants/{grant_id}/messages/send you'd use any time, or nylas email send from the terminal:

nylas email send \
  --to engaged-recipient@example.com \
  --subject "Your booking confirmation" \
  --body "Thanks for booking with us. Here are your details..."

Monitor delivery with webhooks

You can't manage deliverability you can't see, and for an Agent Account the four deliverability webhooks are your real-time signal. Subscribe to message.delivered, message.bounced, message.complaint, and message.rejected to track exactly what happens to each outbound message — the same events Nylas uses to calculate your bounce and complaint rates. From the CLI, one command registers them:

nylas webhook create \
  --url https://yourapp.example.com/webhooks/nylas \
  --triggers message.delivered,message.bounced,message.complaint,message.rejected

The same subscription over the API is a POST /v3/webhooks with the triggers and a callback URL — see the Agent Account webhook notifications reference for each event's payload schema:

curl --request POST \
  --url "https://api.us.nylas.com/v3/webhooks" \
  --header "Authorization: Bearer <NYLAS_API_KEY>" \
  --header "Content-Type: application/json" \
  --data '{
    "trigger_types": [
      "message.delivered",
      "message.bounced",
      "message.complaint",
      "message.rejected"
    ],
    "callback_url": "https://yourapp.example.com/webhooks/nylas"
  }'

Wire these into your own logic. message.delivered confirms a message reached the recipient's server, message.bounced is a hard bounce, message.complaint means the recipient marked it as spam, and message.rejected fires when an attachment contained a virus, per the webhook notifications reference. Pause or slow your outbound when bounces or complaints climb, and stop mailing any address that hard-bounces. Catching a problem in your own telemetry is what keeps you under the thresholds that pause sending.

Stay under the bounce and complaint thresholds

Nylas tracks a rolling bounce rate and complaint rate for each Agent Account, and crossing either threshold has consequences. Bounce rate is hard bounces — addresses that don't exist, not transient soft bounces — divided by your recent send volume. Complaint rate is spam reports divided by recent volume, counted only against recipient domains that report complaints back to senders. The denominator is a recent volume window, so the rate stays meaningful whether you send a hundred messages a day or a million.

Here's where each rate puts an account:

Bounce rate State What happens
Under 2% Healthy Normal sending
5% or above Under review Sending continues; sustained bounces lead to a pause
10% or above Paused Outbound sends fail until Nylas clears the pause
Complaint rate State What happens
Under 0.1% Healthy Normal sending
0.1% or above Under review Sending continues; sustained complaints lead to a pause
0.5% or above Paused Outbound sends fail until Nylas clears the pause

The complaint threshold is low enough — 0.1% — that even a handful of recipients reporting your mail can put a low-volume account under review. Under review is silent to your application; a pause returns immediate feedback on the send call.

What a pause looks like to your code

When enforcement kicks in, your send requests start failing, and the status code tells you which problem you have. These are the three you'll see, and they call for different handling:

Status Cause What to do
400 Bad Request Reputation enforcement paused sending Stop sending from the account and fix the bounce or complaint source
403 Forbidden The from domain isn't verified, or an abuse restriction applies Finish domain verification, or contact support for an abuse block
429 Too Many Requests A per-account or per-domain rate limit was hit Back off and retry; contact support to raise a rate limit

One thing to design for: a reputation pause does not clear itself on a timer. Resuming requires Nylas to lift it, so you contact support with the bounce or complaint source and the fix you've applied. That's the opposite of a 429, which clears as soon as you slow down. An abuse restriction returns 403 with the body send blocked by abuse restriction and is also cleared by support, not by waiting.

Sending limits that interact with deliverability

Beyond reputation, a few hard limits shape how an agent can send, and hitting them returns 429. Each Agent Account has a daily send quota — 200 messages on the free plan, with no daily cap on paid plans by default. Your organization shares a per-second rate too: all sandbox applications pool to 1 request per second, and all production applications to 5 per second. A single message should address at most 50 recipients across to, cc, and bcc, and must be 25 MB or less in total size.

These interact with warm-up in a way that's easy to miss. Calendar invitations count against the daily send quota, and when an account is over quota the event still saves but the invitation is skipped silently — so an agent that both emails and schedules can quietly stop notifying people. Batch large audiences into groups of 50 or fewer, and keep your per-second send rate under the pooled cap so a burst doesn't start returning 429 mid-warm-up.

Keep in mind

A short list of habits keeps an agent inside the deliverability envelope once it's sending for real. Each one heads off a specific way reputation slips.

  • Validate addresses before sending and skip any that have hard-bounced before. Hard bounces are the fastest way to a paused account.
  • Honor unsubscribe and removal requests immediately. At a 0.1% complaint threshold, ignoring a few costs you.
  • Wire up all four deliverability triggers and pause your own outbound when bounced, complaint, or rejected rates climb — you'll see it in your telemetry before Nylas tells you.
  • Keep the From domain consistent with the domain your accounts are verified on, so DMARC alignment holds. Forwarding breaks SPF, but DKIM survives it, which is exactly why DMARC accepts a pass from either.
  • Warm each domain separately. Reputation doesn't transfer, so a second domain starts from zero no matter how good the first one's record is.

Wrapping up

Deliverability for an agent is the same discipline as for any sender, with the advantage that you own the domain end to end. Authenticate first, layer DMARC on in stages, warm the domain over four weeks, and let the four deliverability webhooks feed your own pause-and-slow logic. The thresholds are strict — 10% bounces or 0.5% complaints pauses an account — but every signal that feeds them is one you can watch in real time and act on before Nylas has to.

Where to go next: