Skip to content

Latest commit

 

History

History
132 lines (80 loc) · 7.33 KB

File metadata and controls

132 lines (80 loc) · 7.33 KB
title excerpt updated
How to prevent your emails from being marked as spam
Find out how to apply best practices for email sending in order to limit the risk of legitimate emails being blocked by spam protection
2024-09-24

Objective

In general, anti-spam policies are strict. To ensure that emails reach recipients without being blocked by security tools, you will need to configure your services to authenticate your messages and their content on the recipient servers that process them.

This guide will give you a few tips on optimizing how your emails are sent.

Warning

OVHcloud provides services for which you are responsible with regard to their configuration and management. It is therefore your responsibility to ensure that they function correctly.

This guide is designed to assist you in common tasks as much as possible. Nevertheless, we recommend contacting a specialist service provider or reaching out to our community if you experience any issues.

Requirements

  • You must be an administrator of a configured email server.
  • You must be able to manage the DNS zone for the domain name(s) used for sending.

Warning

The purpose of this guide is to provide you with a number of tips on optimizing how your emails are sent. Keep in mind that each email service has its own guidelines and best practices for ensuring that messages are received by recipients. We strongly recommend that you consult these guidelines.

Instructions

Configure the SPF record

If you are using a dedicated infrastructure (e.g. a dedicated server, VPS, Public Cloud instance or Hosted Private Cloud VM), the optimal SPF (Sender Policy Framework) record is: v=spf1 ip4:server_ipv4 ~all. Please remember to replace "server_ipv4" with your server's IPv4 address.

[!primary]

The symbol before all is very important:

  • +: accept
  • -: reject
  • ~: soft fail
  • ?: neutral

You can go even further, by configuring the SPF record for a specific domain name, or by using the IPv6 address. To understand SPF registration, please refer to our guide on configuring an SPF record.

Configure the DKIM record

The DKIM (DomainKeys Identified Mail) record is used to sign emails in order to counter email spoofing. This signature works on the principle of a private key/public key pair, allowing the sender domain to be authenticated.

For more information, see our guide to configure a DKIM record.

Configure DMARC record

DMARC (Domain-based Message Authentication, Reporting and Compliance) is a security standard that relies on the two methods of SPF and DKIM email security. The arguments in the DMARC record guide the recipient on how to handle emails, depending on the SPF and/or DKIM result. An email address can be defined in the DMARC record, which will receive a report on authentication failures.

For more information, see our guide to configuring a DMARC record.

Configure the reverse IP resolution

To further optimize email sending and lower the risk of your emails being blocked, you can also configure the reverse DNS path (PTR record) with your domain name.

To begin, create an A record in the DNS Zone of your domain with the IP address of your server as a target.

If your domain name uses OVHcloud DNS servers, please refer to our guide on editing an OVHcloud DNS zone via the OVHcloud Control Panel.

Once you have modified your domain name’s DNS zone, it can take up to 24 hours for the changes to propagate fully, and be effective.

To configure the reverse DNS path in the OVHcloud Control Panel please refer to our dedicated guide.

Specific types of email sending

To a Microsoft server (Outlook, etc.)

Microsoft uses a whitelist policy. This means that initially, everything starts off on a blacklist, and a specific procedure is required to validate your email server.

Before starting the procedure to whitelist your IP, make sure you have a reverse IP configured.

Microsoft also checks the SPF record, so it is recommended that you configure it.

Next, you will need to sign the SNDS (Smart Network Data Services) and JMRP (Junk Mail Reporting Partner Program) contracts. To subscribe, create a free account at https://postmaster.live.com/snds/JMRP.aspx?wa=wsignin1.0.

Once your account is created, you must fill in the following form:

  • Company name
  • Contact email address: (A valid email address where Microsoft can contact you.)
  • Complaint feedback email address: (A valid email address where you will receive spam complaints. The best practices want the email to be in the form: [email protected].)

Next, add your IP addresses in the section IP address or range.

When clicking on Add new Network, you will be asked to choose a contact email to authorize the request. Enter the address [email protected] (obviously replace it with your own address) previously defined to receive spam complaints.

Once the information is filled in, click on Begin Setup to transmit the request. Microsoft will then send you an SNDS-JMRP Contract email, and a second email to mydomain.com.

Once the confirmations are approved, the subscription to JMRP/SNDS will be completed.

Once this is done and if your IP appears to be blocked, you can then request to delist it via the junk mail procedure{.external} (usually within 48H).

In some cases, Microsoft may ask the date of the first billing of your IP/server. In this situation, you can send a copy of your bill and add your IP/server details (ex.: host name ns1111111.ip-203-0-113.eu) in your reply.

For additional information, please open a support request{.external} with Microsoft.

Warning

Refusal by Microsoft

It may happen that Microsoft refuses to delist your IP(s), in which case OVHcloud cannot intervene. It is important to respect the best practices of Microsoft.

To a Gmail server

Adding specific records, such as a Domain-based Message Authentication, Reporting, and Compliance (DMARC) or DomainKeys Identified Mail (DKIM) record, can make it easier to receive emails if your recipient is at Gmail. Please refer to our guides listed at the bottom of this page to configure them.

Check your information

You may want to use a website like Mail Tester{.external} to check that all of your settings are correct.

Go further

How to improve email security with a DKIM record

How to improve email security with an SPF record

How to improve email security with a DMARC record

For specialized services (SEO, development, etc.), contact OVHcloud partners.

Join our community of users.