
Short answer: DMARC, SPF and DKIM are official email-authentication records on your domain. Together they help receiving servers tell whether a message that uses your domain was authorized, and they give you reports when something does not pass. For mail to Gmail, official sender guidelines already require SPF or DKIM for every sender, and they require SPF, DKIM and a DMARC record (the policy may start at none) if you send more than 5,000 messages a day to Gmail accounts. Official Gmail documentation says enforcement of those requirements has been ramping up since November 2025. Start with official SPF and DKIM for every system that sends as your domain, publish DMARC at p=none, read the reports, then tighten the policy only after legitimate mail passes.
By Mohamed Samy, senior backend developer specializing in Laravel/PHP, with seven years of experience. Published: 19 November 2026. Updated: 19 November 2026.
This is not legal advice, and it is not a substitute for the current official documentation from Google, Microsoft, the relevant RFCs, or your DNS host. Sender thresholds and enforcement can change. Confirm the live official pages and your provider's official DNS instructions before you publish or tighten a record.
Owners in Egypt and the Gulf usually come to me after invoices, password resets or marketing mail started landing in spam, or after a customer received a message that looked official and was not. That is an email-authentication problem, not the same job as hardening the website itself. The website security checklist still matters, and signs your website is hacked is the right place if the site itself has been compromised. This article stays with the official DNS records that protect the domain you send from. Golden Code does not sell a DMARC product or a packaged email service; when a custom layer is needed, we quote that work separately.
What SPF, DKIM and DMARC actually do
SPF, in RFC 7208, is a DNS TXT record that lists which servers are authorized to send mail for a domain. Official text is blunt: multiple SPF records are not permitted for the same owner name. Google's official SPF guide tells you to identify every sender first, then add one SPF TXT record. If you send only with Google Workspace, the official example is v=spf1 include:_spf.google.com ~all. If other systems also send as your domain, they must be represented in that same official record, not in a second SPF record. Official Google documentation says authentication can take up to 48 hours to start working.
DKIM adds a cryptographic signature to the message. You publish the public key as a DNS TXT record, usually generated by the platform that sends the mail, and you turn signing on in that platform. Official Google documentation again says it can take up to 48 hours to start working, and that each domain needs its own key.
DMARC, in RFC 9989, which replaced the earlier informational RFC 7489, and in Google's official DMARC setup, sits on top of both. A DMARC TXT record at the host _dmarc.example.com (replace the domain with yours) tells receiving servers what to do when a message using your From domain fails authentication, and where to send aggregate reports. Official Google documentation says the v and p tags must be listed first. Official Gmail documentation also states that Gmail does not support the ruf tag used for failure, or forensic, reports.
To pass DMARC, official Google wording is that the message must be authenticated by SPF or DKIM, or both, and that the authenticating domain must be the same domain that appears in the From header. That alignment rule is why a marketing tool that sends "from" your domain, but signs or bounces through its own domain, can fail even when a record exists.
Official Gmail rules, and what they mean in Egypt and the Gulf
These rules are not Egypt-specific, but they apply the moment you write to a Gmail address, which most businesses here do every day.
Gmail's official sender guidelines distinguish two groups, starting 1 February 2024:
- All senders to Gmail accounts must set up SPF or DKIM, have valid forward and reverse DNS (PTR) records, send over TLS, keep spam rates reported in Postmaster Tools below 0.3%, and format messages according to RFC 5322. Official documentation also warns against impersonating Gmail From headers.
- Senders of more than 5,000 messages per day to Gmail accounts must set up SPF and DKIM, and must set up DMARC. Official wording says the DMARC enforcement policy can be set to none. They must also meet the PTR, TLS, RFC 5322 and spam-rate requirements, and for direct mail the From domain must align with either the SPF domain or the DKIM domain. Official guidelines require marketing and subscribed messages to support one-click unsubscribe and to include a visible unsubscribe link.
Gmail's official sender-guidelines FAQ states that, starting November 2025, Gmail is ramping up enforcement on non-compliant traffic, and that messages which fail the requirements can face temporary or permanent rejections. The same official FAQ lists a missing DMARC record, with a minimum policy of none (p=none), among the issues for which delivery support is unavailable. Confirm the live official pages; thresholds and enforcement wording are Google's to update.
If your company sends through Microsoft 365, follow Microsoft's official DMARC setup and its overview of email authentication for that platform. I will not invent a Microsoft volume threshold that those pages do not state. Use the official documents for the stack you actually send from.
Publish official records, then tighten the policy gradually
The official order is not "put p=reject in DNS today". Google's official recommended DMARC rollout is explicit: start with a policy set to none for one week, with no enforcement, so messages are delivered normally while you review daily aggregate reports. After at least a week with no issues in those reports, move to a quarantine policy for a small percentage of messages. Official examples use a pct tag on quarantine and reject records; official text says a small organization might start at 10% and a large one at 1%. You choose the percentage from the official reports, not from a generic blog. You can later move to reject, which official documentation describes as messages that fail DMARC never being delivered.
Official starter-style examples on the rollout page include v=DMARC1; p=none; rua=mailto:dmarc@example.com. Replace the example mailbox with an address you control. Official Google documentation also notes that some hosts automatically append the domain name, so you should verify the final hostname is _dmarc on your domain, not a doubled name.
If you want reports delivered to a mailbox on a different domain, official Google DMARC documentation requires an extra TXT record on that mailbox domain. Do not point rua at an address you do not control. Aggregate reports describe sending sources; treat that mailbox as operational data. This article is not a reading of Egypt's personal-data rules; if those rules apply to a system you run, use official guidance and our Egypt personal data protection law guide.
Official Google examples sometimes include strict alignment tags such as adkim=s and aspf=s. Official text also describes relaxed alignment as the default. When you are starting, prefer the official recommended rollout at p=none and learn from the reports before you copy a strict, reject-level example.

When official records are enough, and when a custom layer is the better job
Official records are usually enough when:
- One official platform, such as Google Workspace or Microsoft 365, sends almost all of the mail, and you can follow that platform's official SPF, DKIM and DMARC instructions.
- You can name every other sender, put them in one SPF record, and enable official DKIM for each of them.
- You have a mailbox that can receive aggregate reports, and someone will read them before the policy is tightened.
A custom layer is worth scoping when:
- Invoices, password resets, a store, an ERP or a marketing tool all send "from" your domain, and official reports show failures you cannot fix from a single dashboard.
- The From domain in those systems does not align with official SPF or DKIM, and the application, not only the DNS record, has to change.
- You need a repeatable way to collect official reports and watch new senders before you move from none to quarantine or reject.
Golden Code will not pretend that a custom Laravel service is a substitute for the official DNS records. We will also not sell you a third-party DMARC inbox or invent a package price.
What we build, and what we will not promise
When the job is a custom layer, we work in Laravel and PHP, or on the sending application itself, so official From domains, SPF includes and DKIM signing match the systems you actually use. We will read the current official docs with you, inventory senders, and test on a non-production or low-risk policy first.
We will not operate your DNS host, resell Google Workspace or Microsoft 365, or guarantee inbox placement. Official spam-rate, PTR and unsubscribe rules still sit with you and with the sending platform. Use official Google and Microsoft support channels for product-side questions, and use a custom build only for the layer that sits in your systems.
Six steps to set up DMARC, SPF and DKIM
Step 1: List every domain and every system that sends mail as that domain
Write down the company domains, and every platform that sends as them: Google Workspace, Microsoft 365, the website, an ERP, a payment or marketing tool. Official SPF setup starts by identifying all senders. Note whether you send more than 5,000 messages a day to Gmail accounts, because official Gmail guidelines then require SPF, DKIM and DMARC.
Step 2: Publish one official SPF record that lists those senders
Add a single SPF TXT record at the domain, following your DNS host's official instructions and the official guide for each platform. RFC 7208 does not permit multiple SPF records for the same owner name. If you send only with Google Workspace, the official Google example is v=spf1 include:_spf.google.com ~all. If other senders exist, they belong in that same record. Allow up to 48 hours, then verify with official tools from your provider.
Step 3: Turn on official DKIM for each sending platform
Generate the official DKIM key in each platform that sends as your domain, publish the official TXT record at the host name that platform gives you, and enable signing. Official Google documentation says this can take up to 48 hours. Repeat for every domain and every sender.
Step 4: Publish DMARC at p=none and receive official aggregate reports
Add a DMARC TXT record at _dmarc on your domain, starting with v=DMARC1; p=none and a rua mailbox you control, as official Google rollout documentation recommends. Confirm the host name was not doubled by the DNS interface. Official Gmail documentation does not support ruf failure reports, so do not depend on them.
Step 5: Read the reports and fix alignment before you tighten the policy
Review official aggregate reports for at least a week, as the official rollout guide describes. Look for senders that are not in SPF, are not signing with DKIM, or do not align with the From domain. Fix those systems first. Official Gmail rules for high-volume senders require that alignment for direct mail.
Step 6: Tighten the official policy only after legitimate mail passes, and ask for a custom quote if it does not
If official reports show no issues, move to a quarantine policy for a small percentage, then increase it, following official rollout guidance, before you consider reject. If several applications still fail official checks, write that gap down and request a custom technical quote. Do not jump to a reject policy to "get it over with".
Soft next step
If your domain in Egypt or the Gulf already sends invoices, resets or campaigns, and official Gmail or Microsoft documentation says you need SPF, DKIM or DMARC you do not yet have, write down the sending systems and the official gap. You can then request a custom technical quote from Golden Code. We will answer against official documentation and against your scope, not with a ready-made email package.
FAQ
Do we need DMARC if we send only a few emails a day?
Official Gmail guidelines require SPF or DKIM for all senders to Gmail accounts. Official DMARC is required if you send more than 5,000 messages a day to Gmail accounts, and the policy may start at none. Official Google documentation still recommends setting up DMARC even when it is not the minimum for your volume. Confirm the live official threshold for your case.
What should the first DMARC policy be?
Official Google rollout documentation says to start with a policy set to none for one week, review daily aggregate reports, and only then move to quarantine for a small percentage of messages. Official starter examples look like v=DMARC1; p=none; rua=mailto:you@your-domain. Do not begin with reject.
Can we publish two SPF records, one for Google and one for Microsoft?
No. RFC 7208 states that multiple SPF records are not permitted for the same owner name. Official platform guides expect you to identify every sender and express them in one SPF record for that domain.
How long do SPF and DKIM take to start working?
Official Google documentation says it can take up to 48 hours for SPF authentication, and up to 48 hours for DKIM authentication, to start working. Publish the official records, wait for that window, then verify with the official checks your provider documents.
Does a DMARC record stop someone from hacking our website?
No. DMARC, SPF and DKIM authenticate mail that uses your domain. They do not replace website updates, backups or account security. If you think the site itself is compromised, use a website incident guide, not only a DNS change.
Do you sell a fixed DMARC setup package?
No. Golden Code builds custom work when official records are not enough, usually because several systems send as your domain and need alignment in the application. The scope depends on those systems, so we provide a custom technical quote rather than a published package price.
Sources
- Gmail email sender guidelines
- Gmail email sender guidelines FAQ
- Google Workspace: Set up SPF
- Google Workspace: Set up DKIM
- Google Workspace: Set up DMARC
- Google Workspace: Recommended DMARC rollout
- Microsoft 365: Email authentication overview
- Microsoft 365: Set up DMARC
- RFC 7208: Sender Policy Framework (SPF)
- RFC 9989: DMARC




