Hare Krishna Trust

Hare Krishna Trust

Hare Krishna Trust

SPF and DKIM in Send Mail As: Where Alignment Lives

Most Gmail “alias” advice stops at the plus sign. You add +news to your address, mail lands in the same inbox, and you call it done. Then you try to send from a second Gmail address or a mailbox on your own domain, and the feature that actually matters is Send mail as. That is where the plumbing gets real, and where a setup that looks fine in the Gmail UI can quietly fail authentication at the receiving end.

This is a checklist-style walkthrough of Send mail as setup and SMTP verification, written for people who need the From field to survive a DMARC check rather than just display a different name. The thesis is narrow: when Gmail sends through an external SMTP host, SPF and DKIM alignment live in the external provider’s DNS and the provider’s authenticated session, not in Gmail’s records. Gmail is a relay with stored credentials, not the signing domain. Get the SMTP account and the From domain out of sync and the message will still leave your outbox, but receiving filters will read the gap as a spoofing signal, and your invoice reminder or support reply lands in spam.

Along the way you will see how Gmail verifies an address before it appears in the From field, what the verification email actually proves and what it never checks. You will compare sending through Gmail’s servers against authenticating to your own SMTP host, and you will look at the DNS records that have to be in place first: SPF on the sending domain, a DKIM selector published at the provider, and a DMARC policy that ties the two together. There is a diagnostics section on reading Authentication-Results and Received headers from a test message so you can see which host authenticated and which domain passed. The closing checklist covers the maintenance risks that break working setups months later: rotated SMTP passwords, provider rate limits, and plus aliases that mask delivery problems instead of revealing them. Treat each item as a pass or fail. A partial pass is a spam folder waiting to happen.

Send Mail As vs. Gmail Aliases: What Each Mechanism Actually Changes

The word “alias” in Gmail covers at least four different mechanisms, and mixing them up is the root of most authentication confusion. A Gmail email alias is not one feature. It is a family of features that change different parts of the message, and only one of them touches the envelope sender at all.

Plus aliases are the simplest case. Gmail offers plus aliases on every account: append +anything to your username and mail still delivers to the same inbox. The plus sign alias is purely a routing label. It does not create a second mailbox, it does not change the From header, and it does not change the envelope sender. The envelope sender remains your exact gmail.com address. What plus aliases give you is a filterable string. Gmail filters can be created on plus alias addresses, which makes them useful for sorting signups or catching a leaked address. They are not a second Gmail address in any deliverability sense.

Dots behave the same way. Gmail ignores periods in the local part of a gmail.com address, so first.last@gmail.com and firstlast@gmail.com reach the same inbox. Dot aliases are an addressing quirk, not a separate identity. Nothing in the SMTP conversation changes.

Alternate addresses are different again. Under Gmail settings, Accounts and Import, you can register another address you own that receives forwarded mail into this account. That is email forwarding into a mailbox, not sending from it. The From header still shows the gmail.com address unless you take an extra step.

What Send mail as Actually Changes

Send mail as is the only mechanism here that rewrites the visible sender. When you add an address in the Send mail as dialog, Gmail composes messages with that address in the From header. Whether the envelope sender changes depends entirely on the send path you choose. If Gmail sends on your behalf through its own servers, the envelope stays within Google’s infrastructure and your external domain’s SPF record is not consulted. If you configure an external SMTP server, Gmail authenticates to that host with stored credentials, and the envelope sender becomes the external mailbox.

That distinction is the whole game. Plus aliases and dots relabel nothing. Alternate addresses forward mail. Send mail as relabels the From header and, on the external SMTP path, changes who authenticates the message. Gmail supports up to 99 addresses in Send mail as, and changing your gmail.com address is allowed once every 12 months, so treat each added identity as durable. Google Workspace allows 30 aliases per user on top of that, with Google documenting alias limits on its help pages.

How Gmail Verifies an Address Before It Appears in the From Field

Adding an address under Send mail as starts with a confirmation loop, not a DNS check. Open Gmail settings, go to the Accounts and Import tab (labeled Accounts in newer layouts), and click Add another email address. Enter the display name and the address, then decide whether to uncheck Treat as an alias. If you leave it checked, replies route back through your primary Gmail account; if you uncheck it, recipients see the alternate address as the reply path. For a second Gmail address or an external mailbox, the checkbox changes reply behavior only. It does not change authentication.

Click Next Step and Gmail asks for either a send path through Gmail’s servers or an SMTP server with credentials. Submit the dialog and Gmail sends a verification email to the address you just typed. That message contains a link and a confirmation code. Open the mailbox, click the link, or paste the code into the pending entry in settings. The address then appears in the From drop-down within a minute or two, occasionally after a settings refresh.

What Gmail confirms at that moment is narrow. The link proves that whoever controls the inbox can read mail sent to it. The SMTP credentials, when you supply them, prove that the host accepts that username and password on the configured port with the configured encryption. That is the whole handshake.

What Gmail never checks is the part that decides spam placement later:

  • Whether the domain publishes an SPF record that authorizes the sending host
  • Whether a DKIM selector exists and signs outbound mail with a key the domain controls
  • Whether a DMARC policy exists, or whether the From domain aligns with the envelope domain
  • Whether the SMTP account you authenticated belongs to the same domain as the From address

Verification is a mailbox ownership test, nothing more. A setup can pass verification and still fail SPF alignment on every send, because Gmail accepted the credentials without ever querying DNS for the From domain.

Two practical notes. First, the verification link expires; if it sits unread for days, delete the pending entry and add the address again rather than hunting for a resend button that is not there. Second, an address that already appears in the From field can be edited, but changing the address itself means deleting the entry and repeating the whole flow, including the confirmation email. Plan the From address before you start, especially if the domain publishes a strict DMARC policy that rejects unaligned mail.

Choosing Between Gmail’s Servers and Your Own SMTP Server

Open Gmail settings, go to the Accounts and Import tab, and click “Add another email address” under Send mail as. The dialog that appears has two paths, and the radio button you pick decides who actually talks to the recipient’s mail server.

Path 1: “Send through Gmail (easier to set up).” Gmail stays the sending host. Your message leaves Google’s infrastructure, and the envelope sender belongs to your Gmail account. Gmail rewrites the From header to the alias address you added, but it does not hold credentials for that mailbox and never authenticates as it. This path works for any address you can receive mail at, including a plus alias or a second Gmail address, because the only proof Gmail asks for is the verification email. The trade-off is that SPF for the alias domain is evaluated against Google’s servers, and if that domain’s SPF record does not authorize Google, alignment fails.

Path 2: “Send through your own SMTP server (recommended for professional domains).” Here Gmail behaves as a mail client. It opens a connection to the SMTP host you specify, authenticates with the username and password you store, and hands over the message. The external server does the actual delivery. In this mode Gmail is authenticating as the external mailbox on every send, so SPF and DKIM results are produced by that provider’s infrastructure and DNS, not by Gmail’s. Google’s help pages document the fields: SMTP server, port, connection type, username, and password. Use port 465 with SSL or 587 with TLS, and use an app-specific password if the provider enforces two-factor authentication.

Pick between them with these checks:

  • Domain ownership: if you control the DNS of the From domain, external SMTP gives you full control over SPF, DKIM, and DMARC alignment. If you do not, Gmail’s servers are the only realistic option.
  • Deliverability history: a domain with warmed DKIM keys and a clean sending reputation will perform better through its own provider than through Gmail’s shared path.
  • Credential risk: external SMTP stores a password inside Gmail. Rotate it at the provider and you must update it here or sends break silently.
  • Volume and limits: your provider’s rate limits now apply to every message, including replies sent from the web interface.
  • Future-proofing: Gmail will discontinue Send as for third-party addresses starting January 2027, so treat any external SMTP configuration as something to re-verify rather than set and forget.

The rule of thumb: Gmail’s servers for convenience and non-owned addresses, your own SMTP server whenever the From domain carries your brand and you can publish its DNS records.

Where SPF and DKIM Alignment Really Live When You Send Through External SMTP

When the Send mail as entry is configured to use an external SMTP host, every message leaves Google’s infrastructure after Gmail has authenticated to that host with the stored username and password. From that point the receiving side evaluates the message exactly as if it had been submitted directly by the external provider. Gmail is a relay, not the author. The SPF check that matters is the one performed against the envelope sender and the connecting IP of the external SMTP server, and the DKIM signature that matters is the one the external provider applied with its own private key. Neither is controlled by Google.

This has a concrete consequence. If you send from a Google Workspace mailbox through an external SMTP account, Gmail’s own SPF record and DKIM selector are irrelevant to the result. Gmail did not originate the message on the wire. What the receiver sees is the external host’s IP, the external host’s Return-Path, and a d= tag matching the external domain. Alignment is judged against the From header, so the external provider’s DNS must authorize the domain shown in From, not the domain Gmail uses for its own outbound mail.

Walk through the checks in order:

  • SPF. The receiving MTA looks up the TXT record on the domain in the envelope sender. That domain belongs to the external SMTP account. The record must include the external provider’s sending IPs or its include mechanism. Gmail’s SPF record does nothing here.
  • DKIM. The signature is added by the external host using a selector published under the external domain. If the provider signs with its shared domain rather than yours, DKIM passes but the d= value does not align with From.
  • DMARC alignment. Strict alignment requires the authenticated domain to equal the From domain exactly. Relaxed alignment allows an organizational-domain match. A shared signing domain almost never satisfies strict mode.

The same logic applies to the Gmail plus aliases and dot aliases covered earlier. They never touch SPF or DKIM because they never change the sending host. Only Send mail as with external SMTP moves the authentication boundary.

Two practical notes. First, the Send mail as dialog supports up to 99 addresses, and each one can point to a different SMTP host with different DNS requirements. Audit them individually rather than assuming one record covers the set. Second, Gmail will discontinue Send as for third-party addresses starting January 2027, so verify now whether your alignment depends on a path that will be retired, and plan a migration to a provider that keeps its own authenticated sending domain aligned with From.

Why the SMTP Account and the From Domain Must Match

What alignment means in practice

SPF authenticates the envelope sender (the MAIL FROM domain used in the SMTP conversation). DKIM authenticates the d= domain in the signature header. DMARC passes only when at least one of those authenticated domains aligns with the From header domain, either exactly (strict) or as an organizational domain (relaxed). When you configure Send mail as with external SMTP, Gmail’s servers are no longer in the sending path at all. The SPF check happens against your provider’s outbound IPs, and the DKIM signature is applied by that provider’s infrastructure. Gmail is just a client here.

The failure case: authenticated identity versus visible identity

Suppose the SMTP account is you@mailprovider.example but the From field shows you@yourdomain.example, and yourdomain.example publishes no SPF record that includes mailprovider.example and no DKIM selector at that provider. The message leaves the provider with SPF passing for mailprovider.example and DKIM signing for mailprovider.example. Neither aligns with yourdomain.example. Result: DMARC evaluates as fail on both mechanisms.

Receiving filters do not know your intent. They see a message claiming to be from a domain that did not authorize the sending host and did not sign the payload. That is the exact pattern bulk spoofing campaigns produce, so the message gets scored accordingly: spam folder, or a straight reject at strict receivers. This is why a mismatch is not cosmetic. The gap between the authenticated SMTP identity and the From domain is the signal.

Matching the two, and the cases that force a mismatch

The clean configuration is: SMTP host on the same domain as From, with SPF and DKIM published there. Checklist for verifying the match:

  • Compare the SMTP server hostname in Gmail settings with the domain in the From field. They should belong to the same organizational domain.
  • Confirm the provider’s SPF record includes the IPs it sends from, and that your From domain either uses that record or includes the provider via include:.
  • Confirm the DKIM selector you enabled at the provider is published in DNS on the From domain, not only on the provider’s domain.
  • If you must send as a domain you do not control DNS for, expect DMARC failure and plan for it (subdomain alignment, or a relay that rewrites the envelope).

Google documents alias limits on its help pages and Gmail supports up to 99 Send mail as addresses, which makes it easy to accumulate half-configured entries. Every one of them needs the same alignment check.

DNS Records to Publish Before You Trust the Setup

Publish the records on the domain you put in the From field, not on gmail.com. If the From address is you@yourdomain.com and Gmail authenticates to smtp.yourprovider.com, then yourdomain.com must carry the SPF and DKIM records. Gmail’s own DNS is irrelevant here because Gmail is not the sending host.

SPF

  • One TXT record per domain, starting with v=spf1. Multiple SPF records on the same name is a permanent error and will fail every message.
  • Authorize the actual sending host: v=spf1 include:_spf.yourprovider.com ~all is typical when the provider publishes an include. Use ip4: or ip6: for dedicated hosts.
  • Keep the DNS lookup count at or under 10. Each include, a, mx, ptr, exists, and redirect counts. Exceeding the limit returns permerror and SPF fails.
  • Check the record from the outside: dig TXT yourdomain.com +short and confirm exactly one v=spf1 string comes back. Some DNS panels split long TXT strings into chunks; the resolver rejoins them, but a stray space or quote breaks parsing.
  • Decide on the all qualifier. ~all for soft fail during rollout, -all once you have read the Authentication-Results headers on real traffic and confirmed nothing legitimate fails.

DKIM

  • Get the selector and public key from the external provider, not from Gmail. Gmail signs its own outbound mail with its own selector; it does not sign mail you relay through a third-party SMTP host.
  • Publish the key at selector._domainkey.yourdomain.com as a TXT record with v=DKIM1; k=rsa; p=… The selector name must match exactly what the provider stamps in the DKIM-Signature header.
  • If the provider rotates keys, either keep the old selector live during the overlap or publish both selectors. Removing a key while mail is still signed with it turns passes into fails within the TTL window.
  • Use 2048-bit keys where the provider supports them. Some DNS hosts reject values over 255 characters in a single string, so split the p= value into quoted chunks, which is valid per RFC 6376.

DMARC

  • Publish _dmarc.yourdomain.com with v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com to start collecting aggregate reports.
  • DMARC passes only when SPF or DKIM passes and the authenticated domain aligns with the From domain. SPF alignment can be relaxed, meaning the organizational domain matches; DKIM alignment with the d= tag on your domain is the stricter and more durable path.
  • Move to p=quarantine, then p=reject, only after the rua reports show consistent alignment. Add adkim=s and aspf=s if you want strict alignment and control every subdomain explicitly.

Verify all three with a public checker before sending anything that matters. A missing or duplicated record surfaces as a failure in the recipient’s Authentication-Results header, and no amount of correct Gmail configuration will compensate.

Diagnosing Spam Placement: Reading Authentication-Results Headers

Send a test message to a mailbox you control on a different provider (Outlook, Yahoo, a self-hosted account), not to another Gmail address. Gmail-to-Gmail delivery skips much of the external filtering path and can mask problems. Open the received message, use “Show original” in the three-dot menu, and read the raw headers. You are looking for three blocks: the Authentication-Results header added by the receiving provider, the Received chain, and the DKIM-Signature header your sending domain attached.

Step 1: Confirm which host authenticated. The topmost Received header names the host that handed the message to the recipient. If you sent through your own SMTP server, that host should be your provider (for example, smtp.yourdomain.com), not Google. If Google appears there, the message went out through Gmail’s servers and SPF will be evaluated against google.com, not your domain.

Step 2: Read the SPF line. Look for spf=pass and the smtp.mailfrom or envelope-from value next to it. That domain is what SPF actually validated. If the envelope-from is a Gmail address while the From header shows your domain, SPF passes for Gmail and fails alignment for your domain. A pass with a mismatched domain is the classic soft-fail you are hunting.

Step 3: Read the DKIM line. Check dkim=pass and the header.d value. That is the signing domain, taken from the selector in the DKIM-Signature. If header.d equals your From domain, DKIM alignment holds. If header.d is a shared provider domain (sendgrid.net, amazonses.com), DKIM passes but does not align unless DMARC is set to relaxed mode and the organizational domains match.

Step 4: Check the DMARC verdict. The receiving provider usually adds dmarc=pass or dmarc=fail plus which mechanism (spf or dkim) satisfied alignment. This single field tells you whether the message survived authentication as your domain.

Header field What it proves Common failure sign
Received (top) Which host relayed the message Google host when you expected your SMTP
spf= / smtp.mailfrom Envelope sender IP authorization Pass for a domain that is not yours
dkim= / header.d Signing domain and selector Shared provider domain, no alignment
dmarc= Aligned pass or fail spf=pass but dmarc=fail

Run the test twice: once to a fresh recipient with no prior history, once to an address that has marked you as spam before. Spam placement with clean authentication usually points to reputation or content, not DNS. Keep the raw header of a passing send as a baseline so you can diff it after any SMTP credential or DNS change.

Operational Pitfalls: Credential Changes, Provider Limits, and Alias Hygiene

A Send mail as configuration that works on day one can fail silently three months later. Most failures come from four places: credentials, provider limits, duplicate identity, and alias sprawl. Treat each as a scheduled check, not a one-time setup task.

Credential rotation. When the external provider forces a password reset or expires an app password, Gmail keeps the stored SMTP credential until you replace it. Sends from that From address then fail with an authentication error or fall back to a different identity. Add a calendar reminder for every app password you store, and store the replacement in the same place. If the provider supports OAuth instead of a password, prefer it: tokens refresh without manual intervention.

Provider rate limits. Gmail itself caps how many recipients you can address per day, and your external SMTP host applies its own ceiling, often far lower on budget plans. Bulk mailings through Send mail as are a bad fit; use a dedicated sending service for volume and reserve Send mail as for person-to-person correspondence.

Duplicate identity confusion. Two Send mail as entries pointing at the same address, or a plus alias that looks identical to a real mailbox, produce replies that land in the wrong inbox. Audit the Accounts and Import list quarterly and delete stale entries. Remember that plus aliases all deliver to the same inbox, so an alias that “stopped working” may simply be filtered away. Check the filter list before assuming delivery broke.

Alias sprawl masking delivery problems. Dot aliases and plus sign aliases route to one mailbox, which hides which address a message actually reached. When a sender reports a bounce, inspect the To header before debugging DNS.

Pitfall Typical symptom Fix Check frequency
Rotated SMTP password Send fails with auth error Update stored credential in Send mail as On every provider notice
Provider rate limit Deferred or rejected sends at volume Move bulk mail to a sending service Monthly
Duplicate Send mail as entry Replies arrive in the wrong mailbox Delete the stale entry Quarterly
Plus alias filtered away Address appears dead Review Gmail filters on that alias When a report arrives
Dot alias confusion Wrong To address in headers Read the To header before debugging DNS Per incident

One more constraint worth planning around: Gmail will discontinue Send as for third-party addresses starting January 2027, so any long-lived external identity should have a migration path documented now, not after the sends stop.

Run a controlled test before you trust the configuration with real mail. Pick two external recipients on different providers, one of them a corporate domain that enforces DMARC. Send one message through the Gmail send path and one through your SMTP host, then open each message’s full source and confirm three things: the Return-Path matches the domain you authenticated to, the Authentication-Results header shows spf=pass and dkim=pass for that same domain, and the From header domain aligns with both. If any of the three disagrees, stop and fix DNS before you scale. A DKIM selector that resolves but serves a stale key, or an SPF record that ends in ~all while the provider sends from a subnet you forgot to include, will pass a casual check and still land in spam on strict receivers.

After the test passes, write the setup down so it survives staff turnover: the SMTP hostname and port, the exact username (usually the full mailbox address, not a short login), the date the app password was last rotated, the DKIM selector name, and where the private key lives. Set a calendar reminder to rotate the SMTP credential on the provider’s schedule and to re-run the header check afterward, since a rotated password silently breaks Send mail as with no bounce to the sender, only a stalled outbox entry in Gmail settings. If you rely on plus aliases for routing, add a filter that labels each alias address so a delivery failure on one alias does not hide behind the shared inbox. Keep the From domain and the authenticated SMTP account identical on every entry in the Send mail as list, and treat any entry where they differ as a defect to remove rather than a convenience to keep. That single rule prevents most of the alignment failures that show up months later as unexplained spam placement.