VASCOM TECHNOLOGY AUTOMATION CO., LTD
Home › News › Prevent Email Spoofing with SPF, DKIM, and DMARC

Prevent Email Spoofing with SPF, DKIM, and DMARC

Learn how to inventory email senders, configure SPF, DKIM, and DMARC correctly, review authentication reports, and move gradually from monitoring to quarantine or rejection without disrupting legitimate business email.

Email spoofing often requires no system intrusion: the sender only needs to place the business’s domain in the displayed sender address, then request a bank transfer, a change to the payment recipient account, or a password. SPF, DKIM, and DMARC help receiving mail servers verify the sending source, signature, and handling policy. These three layers complement each other, but they do not perform the same function, and blocking should not be enabled immediately. Failing to include even one legitimate sending service in the configuration can also cause genuine messages to be flagged or rejected.

What do SPF, DKIM, and DMARC do?

SPF verifies the servers authorized to send email

SPF is a TXT record in DNS that lists the IP addresses or services authorized to send email for a domain. The receiving mail server checks the connecting IP address against the envelope sender, usually shown in Return-Path, rather than looking only at the displayed From address. Each domain should have only one SPF record; multiple separate records or too many include entries can cause authentication to fail.

DKIM adds a digital signature to email

The sending server uses a private key to sign selected parts of the email, while the public key is published in DNS so the receiving server can verify it. If the signed content or headers are modified in transit, the signature may no longer be valid. Each sending service usually has its own selector, so teams need to obtain the correct record from the provider and must not publish the private key in DNS.

DMARC checks the results and defines how messages are handled

DMARC checks whether SPF or DKIM passes authentication and is associated with the domain in the displayed From address, a relationship called alignment. The record also allows businesses to request monitoring only, have suspicious email sent to spam, or have it rejected. DMARC does not replace SPF and DKIM; if the underlying configuration is incorrect, the stricter the blocking policy, the more likely legitimate email is to be affected.

What order should deployment follow?

Before changing DNS, businesses need to identify every system sending email using their domain. Overlooking an infrequently used source, such as accounting software or a notification system, is a common reason blocking causes disruption.

  1. Inventory sending sources: include the primary email service, application servers, websites, CRM, customer service tools, and marketing email services. Record the team responsible for each source.
  2. Configure SPF: consolidate authorized sources into a single TXT record according to each provider’s documentation. Do not add addresses or include entries without first confirming their purpose.
  3. Enable DKIM: configure signing on each service, create the public key record for the corresponding selector, then send a test email to verify the signature.
  4. Create DMARC in monitoring mode: publish a TXT record at _dmarc.yourdomain.vn, use p=none, and set rua to a mailbox dedicated to receiving reports.

Monitor reports before full enforcement

The p=none mode collects data without requiring receiving servers to quarantine or reject email. DMARC aggregate reports show the sending sources, SPF and DKIM results, and the degree of domain alignment. Teams should review the results by source rather than looking only at the overall status for the entire domain.

  • Legitimate source with SPF errors: check for new IP addresses, include entries, or routing through an intermediary service.
  • DKIM errors: check the selector and public key, and whether an intermediary service has modified the signed content.
  • Unfamiliar sources: check with the operations team before concluding that this is spoofing or a system that has not yet been declared.

Email forwarding and mailing lists can also cause SPF or DKIM to fail, so not every error should be treated as an attack. Once legitimate sources consistently pass authentication, businesses can move to p=quarantine, continue monitoring, and only then consider p=reject. Subdomains should be checked separately or covered by an appropriate policy.

Check whether the domain is configured correctly

Use a DNS record lookup tool or a command on an administrative workstation to inspect the currently published data directly. Reviewing the provider’s configuration screen alone is not enough, because a record may have been entered with the wrong name or selector, or may not yet have been updated in DNS.

  1. Run nslookup -type=txt yourdomain.vn to find SPF and confirm that only one record starts with v=spf1.
  2. Run nslookup -type=txt _dmarc.yourdomain.vn to check DMARC, the current policy, and the report recipient address.
  3. Look up the TXT record at selector._domainkey.yourdomain.vn for each DKIM service, then send a test email and check Authentication-Results in the email headers.

The results should clearly show SPF, DKIM, and DMARC status for actual emails, not just a “valid” response from a DNS lookup tool. Repeat these checks after changing email providers, adding an email-sending application, or changing servers.

What to do now

  1. List every system sending email using the business’s domain.
  2. Look up SPF, DKIM, and DMARC, and correct any invalid records before changing the policy.
  3. Keep DMARC in monitoring mode, analyze the reports, and only then move to stricter enforcement.

SPF, DKIM, and DMARC need to be updated whenever the sending infrastructure changes. VASCOM can help review the configuration and monitoring process, while maintaining the list of sending sources should become part of routine IT operations.

Tips and how-to Talk to VASCOM
More news

Keep reading

Zalo ☎
VASCOM
Call 0822.577.579 Get a consultation