How to keep email sent by AI agents out of spam

From
Postyard
Sent
Reading
9 minutes

The short answer

AI agent emails go to spam for the same reasons any mail does: a new domain with no history, sudden volume, near-identical messages, and addresses that bounce or complain. Authenticate the domain, ramp up slowly, write only to people who expect the mail, and stop sending to an address at its first bounce or complaint, with a daily cap on every agent.

For your AI assistant View Markdown Ask Claude Ask ChatGPT
On this page
  1. Why AI agent emails go to spam
  2. What Gmail, Yahoo and Microsoft require (as of November 2026)
  3. How to stop AI agent emails going to spam
  4. Postyard's automatic pause is a safety net
  5. A pre-send checklist your agent can run in code
  6. Set up a sending agent on Postyard
  7. Questions

AI agent emails going to spam is rarely about the AI. Gmail, Yahoo and Outlook judge the sender: a domain with no history, a sudden spike in volume, near-identical messages and addresses that bounce look like spam whoever wrote them. To keep agent mail in the inbox, authenticate the domain, ramp up slowly, write only to people who expect the mail, and stop the agent at the first bounce, complaint or runaway loop.

Why AI agent emails go to spam

Agents don't break new rules. They break the old ones faster, because they run unattended and can repeat one bad decision hundreds of times.

Cause What the filter sees Fix
New domain, no history No reputation to trust yet Authenticate, start small
Sudden volume Zero to 500 messages a day overnight Ramp up over weeks
Near-identical messages One text to many people, like a campaign Write each message for its reader; cap repeats
Mail nobody wanted Deletes and "Report spam" clicks Write only to people who expect it
Guessed or scraped addresses Hard bounces Use only addresses people gave you
Link-heavy or tricky HTML Marketing patterns, hidden content Plain text, one or two visible links
Mismatched From A From domain that SPF and DKIM don't cover Send from the authenticated domain

What Gmail, Yahoo and Microsoft require (as of November 2026)

Provider Who it applies to Key rules
Gmail All senders SPF or DKIM, valid forward and reverse DNS, TLS, spam rate below 0.3%
Gmail More than 5,000 messages a day to Gmail accounts SPF and DKIM, DMARC (p=none is fine), aligned From, one-click unsubscribe and a visible unsubscribe link for marketing mail
Yahoo All senders SPF or DKIM, spam rate below 0.3%, forward and reverse DNS
Yahoo Bulk senders SPF and DKIM, DMARC of at least p=none that passes, one-click unsubscribe
Outlook.com More than 5,000 emails a day to Outlook.com accounts SPF and DKIM pass, DMARC at least p=none, aligned; otherwise sent to junk, and may be rejected with 550 5.7.515

The number to watch is the complaint rate. Google: "Keep spam rates reported in Postmaster Tools below 0.10% and avoid ever reaching a spam rate of 0.30% or higher." Since June 2024, Google says bulk senders above 0.3% are "ineligible for mitigation" until they stay under it for 7 consecutive days (FAQ).

How to stop AI agent emails going to spam

1. Authenticate the domain the agent sends from

SPF lists the servers allowed to send for your domain, DKIM signs each message, and DMARC tells receivers what to do when neither passes for the From domain. Every sender needs SPF or DKIM; bulk senders need all three. The record-by-record walkthrough is in SPF, DKIM and DMARC in 2026.

On Postyard a domain can't send until its three DKIM records verify, and the app checks SPF and DMARC and explains any record that fails.

2. Give agent mail its own subdomain

Mailbox providers judge mail by its sending domain. If the agent shares example.com with your invoices and your team, an agent mistake lands on everyone's mail. Yahoo's best practices include a section headed "Segregate Email types by IP or DKIM domain", and Gmail asks that "messages of the same category should have the same From: email address."

Option Example Isolation Trade-off
Same domain agent@example.com None Agent mistakes hit all your mail
Subdomain help@mail.example.com Partial Brand stays recognizable; Gmail still links it to example.com
Separate domain example-help.com Most Starts at zero reputation, looks unfamiliar to readers

A subdomain is the right default, but not a full wall: Gmail counts subdomain mail toward the primary domain when deciding who is a bulk sender. And don't add domains to spread out mail that draws complaints. Postyard's Acceptable Use Policy forbids getting around limits or pauses that way. On Postyard a subdomain is added like any domain and counts as one of the 10 in the plan.

3. Ramp up volume slowly

Google: "Start with a low sending volume to engaged users, and slowly increase the volume over time." It also warns that "immediately doubling previously sent volumes suddenly could result in rate limiting or reputation drops" and asks you to avoid sending in bursts.

A conservative example ramp for a new domain (an example, not a rule any provider publishes):

Week External recipients a day
1 up to 20
2 up to 50
3 up to 100
4+ about 50% more each week

Move up only while hard bounces stay under 2% and complaints at zero.

Postyard enforces a ramp of its own: 200 external recipients a day during the trial, 1,000 in the first 30 paid days, and 10,000 after that.

4. Write only to people who expect the mail

This rule matters most, and agents break it most often. Gmail: "Don't send messages to people who didn't sign up to get messages from you" and "Don't purchase email addresses from other companies."

Good agent mail answers someone who wrote first, follows up on an order or ticket, or notifies a person who asked for it. Bad agent mail goes to addresses found on a website or guessed as first.last@company.com. Guessed addresses bounce; the real ones complain.

Postyard's Acceptable Use Policy does not allow "unsolicited mail, bulk marketing or newsletters to people who didn't ask for them, and purchased, rented or scraped lists." If your agent does cold outreach, Postyard is the wrong tool. Newsletters belong on a service built for lists and one-click unsubscribe.

  • Plain text or simple HTML. Gmail asks you not to "use HTML and CSS to hide content" and wants links "visible and easy to understand." One or two links is plenty. For mail sent through its API or MCP, Postyard cuts HTML down to simple formatting and always sends a plain-text part.
  • Specific, not templated. An agent can write each message for its reader. Fifty copies of one text with only the name changed look like a campaign.
  • A reply address someone reads. Not no-reply@. On Postyard every sending address is a real mailbox or alias, so replies land in an inbox and a message.received webhook can wake the agent.
  • A From that matches. Postyard refuses any message whose From isn't one of the mailbox's own addresses, so it always belongs to a domain you verified.

6. Stop at the first bounce or complaint

A hard bounce means the address doesn't exist: never send to it again. A complaint means the person clicked "Report spam": stop all mail to them. Microsoft's policy says that after multiple non-delivery responses "the sender must cease further attempts" to that recipient.

On Postyard this part is automatic. Hard-bounced and complained addresses go on the organization's suppression list (GET /v1/suppressions, which needs mailboxes.manage, so an admin key), and any message that includes one is refused until you remove the address. Per-recipient delivery status is kept for 180 days (GET /v1/sends). Your own systems should still know, so the agent stops planning mail to that person. Subscribe a webhook to message.bounced, message.complained and organization.sending_paused:

JavaScript
import { createServer } from "node:http";
import { createHmac, timingSafeEqual } from "node:crypto";

const SECRET = process.env.POSTYARD_WEBHOOK_SECRET; // whsec_..., shown once at creation

// Standard Webhooks: base64 HMAC-SHA256 of "{id}.{timestamp}.{raw body}".
function verify(headers, raw) {
  const id = headers["webhook-id"], ts = headers["webhook-timestamp"];
  const sigs = headers["webhook-signature"];
  if (!id || !ts || !sigs || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
  const key = Buffer.from(SECRET.replace(/^whsec_/, ""), "base64");
  const want = createHmac("sha256", key)
    .update(Buffer.concat([Buffer.from(`${id}.${ts}.`), raw])).digest();
  return sigs.split(" ").some((v) => {
    const [version, sig] = v.split(",");
    const got = Buffer.from(sig ?? "", "base64");
    return version === "v1" && got.length === want.length && timingSafeEqual(got, want);
  });
}

createServer((req, res) => {
  const chunks = [];
  req.on("data", (c) => chunks.push(c));
  req.on("end", async () => {
    const raw = Buffer.concat(chunks);
    if (!verify(req.headers, raw)) return res.writeHead(401).end();
    const event = JSON.parse(raw); // retries repeat event.id: keep writes idempotent

    if (event.type === "message.bounced" || event.type === "message.complained") {
      for (const address of event.data.recipients) {
        await markDoNotEmail(address.toLowerCase(), event.type, event.data.reason);
      }
    }
    if (event.type === "organization.sending_paused") await alertHuman(event.data);
    res.writeHead(204).end();
  });
}).listen(8787);

async function markDoNotEmail(address, why, detail) { /* update your contact store */ }
async function alertHuman(stats) { /* sent_7d, bounced_7d, complained_7d */ }

Create it with POST /v1/webhooks and {"url": "https://...", "event_types": ["message.bounced", "message.complained", "organization.sending_paused"]}. Bounce and complaint events carry send_id, mailbox_id, recipients and reason.

7. Give each agent a daily cap

An agent stuck in a loop can send a day's mail in minutes. On Postyard every API key or connection can have its own daily_recipient_cap, counted over a rolling 24 hours inside the organization's daily limit:

Shell
# Needs a key with credentials.manage (an admin key), not the agent's own key.
curl -X PATCH https://api.postyard.dev/v1/api-keys/$KEY_ID \
  -H "Authorization: Bearer $POSTYARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"daily_recipient_cap": 50}'

For an OAuth connection use PATCH /v1/connections/{id}, or set caps in the web app (Quotas and limits, Sending per agent). At the cap that agent is refused with "Daily sending cap reached for this agent" while the others keep working. GET /v1/usage/agents shows each cap and the last 24 hours of sending.

8. Monitor what the providers see

  • Google Postmaster Tools shows the spam rate of DKIM-authenticated mail to personal Gmail accounts, and its new v2 interface adds a Compliance status dashboard that checks you against Gmail's requirements. Google says the Domain and IP Reputation dashboards "will be retired", so watch spam rate and compliance status. On low-volume days the dashboards may show partial data or none.
  • Microsoft SNDS reports per-IP data for Outlook.com: volume, a green, yellow or red filter result, and complaint rates. You must own the IP range to register, and IPs that sent fewer than 100 messages that day may show nothing. On a provider's shared IPs (Postyard sends through Amazon SES) you can't register them yourself, so watch your own bounce data and 550 5.7.515 errors instead.

Postyard's automatic pause is a safety net

Once an organization has sent to at least 50 external recipients in the last 7 days, Postyard pauses its sending automatically if:

  • more than 4% of recipients bounced permanently (with at least 5 bounces), or
  • more than 0.08% complained (with at least 3 complaints).

How that compares (each is measured a little differently):

Who Complaints Bounces
Postyard automatic pause above 0.08% (min. 3) above 4% permanent (min. 5)
Gmail below 0.1%, never 0.3% no figure in its guidelines
Yahoo below 0.3% no figure in its guidelines
Amazon SES review 0.1% under review, 0.5% may pause 5% under review, 10% may pause

Only outbound mail stops: receiving and reading keep working, organization.sending_paused fires, and Postyard reviews the pause with you before sending resumes. It's a safety net, not a target: the policy calls these limits "not permission to send unwanted mail below them." A healthy agent stays far below.

A pre-send checklist your agent can run in code

Put the rules above in code that runs before every send, outside the model. The model drafts; this function decides, and anything it flags goes to a human.

JavaScript
import { createHash } from "node:crypto";

const API = "https://api.postyard.dev";
const auth = { Authorization: `Bearer ${process.env.POSTYARD_API_KEY}` };

// Same text once greeting, numbers and spacing are stripped = a template blast.
const fingerprint = (text) => createHash("sha256").update(
  text.replace(/^\s*(hi|hello|hey|dear)\b[^,\n]*[,\n]/i, "").toLowerCase()
    .replace(/[0-9]+/g, "").replace(/\s+/g, " ").slice(0, 2000)).digest("hex");

export function preSendProblems(msg, ctx) {
  const problems = [];
  const to = [...msg.to, ...(msg.cc ?? [])].map((a) => a.trim().toLowerCase());
  if (to.length === 0 || to.length > 3) problems.push(`${to.length} recipients; agent mail is one-to-one`);
  for (const a of to) {
    if (ctx.suppressed.has(a)) problems.push(`${a} bounced or complained before`);
    if (!ctx.expectsMail(a)) problems.push(`${a} never wrote to us or asked for mail`);
  }
  if (ctx.sentToday + to.length > ctx.dailyBudget) problems.push(`over today's ramp budget (${ctx.dailyBudget})`);

  const text = msg.text ?? "";
  if (text.trim().length < 40) problems.push("text body empty or too short");
  if ((text.match(/https?:\/\//g) ?? []).length > 2) problems.push("more than 2 links");
  if (/bit\.ly|tinyurl\.com/i.test(text)) problems.push("shortened link hides the destination");
  if (!msg.subject?.trim()) problems.push("empty subject");
  if ((ctx.fingerprintsToday.get(fingerprint(text)) ?? 0) >= 5) problems.push("same text already sent 5 times today");
  return problems;
}

export async function sendChecked(mailboxId, msg, ctx, idempotencyKey) {
  const problems = preSendProblems(msg, ctx);
  if (problems.length) return { sent: false, problems };
  const res = await fetch(`${API}/v1/mailboxes/${mailboxId}/messages`, {
    method: "POST",
    headers: { ...auth, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey },
    body: JSON.stringify({ to: msg.to, cc: msg.cc ?? [], subject: msg.subject, text: msg.text }),
  });
  if (!res.ok) return { sent: false, problems: [`Postyard refused the send (status ${res.status})`] };
  ctx.sentToday += msg.to.length + (msg.cc?.length ?? 0);
  const fp = fingerprint(msg.text);
  ctx.fingerprintsToday.set(fp, (ctx.fingerprintsToday.get(fp) ?? 0) + 1);
  return { sent: true, send: await res.json() };
}

ctx.suppressed is the do-not-email set your webhook handler keeps. ctx.expectsMail is your own rule: the address wrote to this mailbox, has an open order, or opted in. ctx.dailyBudget comes from your ramp table. The Idempotency-Key header makes retries safe: the same key and body never send twice. For agents that should draft instead, see how to send email from an AI agent and an AI support inbox with human review.

Set up a sending agent on Postyard

  1. Start the 14-day trial (card required, cancel any time).
  2. Add a subdomain such as mail.example.com and publish the records Postyard lists in two steps: first the ownership TXT and the MX record, then, once ownership verifies, the three DKIM CNAMEs plus the suggested SPF and DMARC records.
  3. Create the agent's mailbox, for example help@mail.example.com.
  4. Create an API key with the read_draft_send preset, restricted to the subdomain (or to the one mailbox through the API), then set its daily_recipient_cap to week one of your ramp.
  5. Point a webhook at message.bounced, message.complained and organization.sending_paused.
  6. Run the checklist before every send. If the agent also reads mail, see how to let AI agents read mail safely.

The plan is $10 a month or $99 a year per organization (pricing) and includes 5,000 outbound recipients a month, then $0.80 per 1,000. Agent docs are at api.postyard.dev/llms.txt.

Questions people ask

Why are my AI agent's emails going to spam?

Usually because of how the sender looks, not what the AI wrote: a new or unauthenticated domain, a sudden jump in volume, the same text sent to many people, or addresses that bounce. Fix authentication first, then slow down and send only to people who expect the mail.

What spam complaint rate is too high for Gmail?

Google asks senders to keep the spam rate shown in Postmaster Tools below 0.1% and never let it reach 0.3%. Yahoo also asks senders to stay below 0.3%.

Should an AI agent send from a subdomain?

Usually yes. A subdomain such as mail.example.com gives agent mail its own records and keeps an agent's mistakes away from the mail your team sends, while recipients still recognize your brand. It is not a full wall: Gmail counts mail from subdomains toward the primary domain when deciding who is a bulk sender.

Can I use an AI agent for cold email outreach?

Not on Postyard: its Acceptable Use Policy forbids unsolicited mail and purchased, rented or scraped lists. Gmail's guidelines also say not to send to people who didn't sign up, and cold mail at agent speed collects complaints fast.

How do I warm up a new domain for agent email?

Start with a few dozen messages a day to people who know you, keep the rate steady, and raise it gradually over several weeks while bounces and complaints stay near zero. Google warns that suddenly doubling your volume can cause rate limiting or reputation drops.

Keep reading

All guides