mailtrap-setting-up-sending-domain
它能做什么
帮助你设置一个用于通过 Mailtrap 发送邮件的域名。这包括添加域名、验证域名确实属于你,以及配置必要的信息,以确保邮件能够正确送达。
适用场景
- ✓为通过 Mailtrap 发送邮件而设置新域名时。
- ✓域名验证不成功时。
- ✓需要帮助配置 DNS 设置(SPF、DKIM、DMARC)时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mailtrap-setting-up-sending-domain/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想把我的域名 'myemail.com' 设置为通过 Mailtrap 发送邮件,但验证一直失败。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要在域名的 DNS 系统中添加特定的记录(如 SPF、DKIM 和 DMARC)。Mailtrap 会提供这些准确的记录,你只需复制粘贴即可。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Setting up a Mailtrap sending domain
Overview
You must add and verify a domain you control before live sending. Mailtrap shows every DNS record required for that domain in the UI: add the complete set as given (do not cherry-pick). After DNS verifies, complete the compliance step if requested.
Subdomain vs root: add the exact hostname you will use in the From address. If you send from notifications.mycompany.com, add that subdomain as the sending domain—not only mycompany.com, unless you truly send from the root domain.
For step-by-step clicks at common hosts, open the matching guide on Sending domain setup (Cloudflare, Route 53, etc.) and follow it alongside the live UI values.
Related skills: mailtrap-sending-emails (after domain is ready).
When to use
- New Sending Domains setup, stuck verification, or compliance questions
- DNS at Cloudflare, AWS, Google, Namecheap, GoDaddy, DigitalOcean, etc.
When not to use
- Sandbox-only testing without a custom domain (see
mailtrap-testing-with-sandbox)
Authorization
The Sending Domains API calls below need Authorization: Bearer $MAILTRAP_API_TOKEN and an $MAILTRAP_ACCOUNT_ID in the path. Resolve $MAILTRAP_ACCOUNT_ID from GET https://mailtrap.io/api/accounts, and store tokens in environment variables or a secrets manager.
Automating setup (API and DNS providers)
Prefer this path when building scripts or AI-assisted automation:
- DNS records and status via API — Use the Sending Domains API:
GET https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/sending_domains— lists domainsGET https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/sending_domains/{sending_domain_id}— returnsdns_records(each withtype,name,value, and verificationstatus) anddns_verified. Poll after you publish DNS.
- Create domain via API —
POST https://mailtrap.io/api/accounts/$MAILTRAP_ACCOUNT_ID/sending_domainswithdomain_namewhen your flow provisions domains programmatically.
- Publish DNS programmatically —
- Create the returned records at your DNS host using their API (e.g., Cloudflare API, AWS Route 53, Google Cloud DNS) or IaC. Align record names and values exactly with the API response.
Human fallback: Sending Domains > Add domain > copy values into the registrar UI > Verify when API automation is not available.
Workflow (summary)
- Sending Domains > Add domain and enter the domain name.
- Obtain required records from the UI or Sending Domains API; create all listed records at your DNS host exactly as shown (names, types, values).
- Wait for DNS propagation. If verification stays pending, use
dig,nslookup, or an online DNS lookup to confirm each record is visible publicly before clicking Verify again. - Complete the compliance flow when prompted.
Product walkthrough: Sending domain setup.
DNS provider guides (documentation)
Mailtrap publishes click-path guides for common providers. Open the page that matches the user's DNS host and follow it together with the live UI records:
- Cloudflare
- AWS Route 53
- Google Cloud DNS
- Squarespace (includes former Google Domains transition notes where applicable)
- GoDaddy
- Namecheap
- DigitalOcean
If the user's provider is not listed, the same rule applies: copy every record from Mailtrap into the DNS zone that serves the From domain.
Important DNS caveat (proxied DNS)
…
常见问题
SPF、DKIM、DMARC 这类 DNS 记录是什么?
它们就像邮件的“真实性凭证”。它们能帮助邮件服务器确认从你的域名发出的邮件是合法的,而不是垃圾邮件。
什么是“DNS 传播”?
指新的 DNS 设置在全网更新所需的时间,通常从几分钟到几小时不等。
我能使用像 'contact.mydomain.com' 这样的子域名吗?
可以,你可以使用子域名。请确保在 Mailtrap 中添加你实际用于发送邮件的那个完整子域名。
详情
作者的原始描述
Add or verify a Mailtrap sending domain, troubleshoot DNS propagation, publish SPF/DKIM/DMARC records, and complete compliance.
热度
- GitHub 星标
- 48k
- 排名
- #5135
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。