Pages

How can I prevent my e-mails getting marked as spam?

You have your own e-mail server, but your e-mails are landing in the spam folder or do not even arrive? This can have several reasons. This tutorial will show you the most important tricks and often overseen configuration mistakes. If you have a webspace package, you will only need the point SPF of this tutorial. In this tutorial we will often use the fictional domain server.yourdomain.com and the IP address 1.2.3.4. Please replace them with your own ones when you are doing the tests or configuration.

SMTP banner

The SMTP banner is the label of your e-mail server. When it connects to a different e-mail server, it is introducing itself with it. If you have a server from us, it will, at the beginning, answer with something like this:

m1234.contabo.net

A lot of e-mail providers will not accept such a label and send your e-mail directly into the spam folder. So it is better to choose a less generic one like:

server.yourdomain.com

Please note that it has to  be a fully qualified domain name (FQDN). That means there has to be a subdomain like “server” in front of yourdomain.com. You can request the current SMTP banner by connecting to your server with Telnet over port 25. You can do this in Windows by entering the following command into the Windows  command prompt:

telnet 1.2.3.4 25

Please use your own server IP here. If you are using Windows, you will have to activate Telnet first! (Start –> Control Panel –> Programs and Features –> Turn Windows features on or off–> wait a moment, then check the Telnet Client check box and finish with clicking on OK)
The output might look like this:

220 m1234.contabo.net ESMTP Postfix (Debian/GNU)

“m1234.contabo.net” is the important information in this line. You can leave the session by entering “quit” and hitting enter. In cPanel and Plesk, the mailserver’s name in the SMTP banner is equal to the hostname. So you can alter it by changing the hostname in the administration panel.
If you are using Plesk on a Windows server, it is not so easy to change the banner. Please log into your server over RDP, open the tool “MailEnable” and go to: MailEnable Management –> Servers –> localhost –> Connectors. Then choose in the opening list SMTP, click on it with you right mouse key and open “Properties”. In the opening window, there are four fields you have to fill in:

Local Domain Name

Here you have to enter you main domain. For example: yourdomain.com.

Default mail domain name

This is your e-mail server name in the SMTP banner. For example: server.yourdomain.com

DNS Addresses

Here you have to enter the DNS servers. If you have your server in one of our datacenters, the following addresses would work perfectly:

for Nuremberg:
213.136.95.10 213.136.95.11

for Munich:
79.143.183.251 79.143.183.252

Notification email address

Please enter an existing e-mail address.

If you are using Postfix instead of an administration panel, you can change the SMTP banner by using this command in the terminal:

postconf -e “myhostname = server.yourdomain.com” && postfix reload

Please replace “server.yourdomain.com” with the new domain name of the e-mail server.

PTR

The PTR, or also called reverse DNS record, is the counterpart of the A-record in a DNS zone.

A-record:

server.yourdomain.com –> 1.2.3.4

PTR:

1.2.3.4 –> server.yourdomain.com

Most e-mail servers only accept an e-mail, if the PTR is exactly the same as the name of the mailserver in the SMTP-Banner! If you have for example the following SMTP-Banner:

220 server.yourdomain.com  ESMTP Postfix (Debian/GNU)

You have to change your PTR like in the upper example, what can be done easily in the Customer Control Panel. Please notice, that you have to change the PTR of the IPv6 address too, if you are using IPv6 additionally to IPv4. It will not harm to do it anyway, if you are not sure.

SPF

With the SPF record you determine that it is only allowed to send e-mails from specific IP addresses. Many e-mail servers are considering e-mails from domains without SPF record as spam. You can add an SPF record in the Customer Control Panel with the DNS Zone Management. The following one should work in most cases:

86400 in TXT “v=spf1 +a +mx ~all”

It will allow the IP named in the A-record and the one of the mailserver, named in the MX-record.

If you use one of our webspace packages, please use the following one:

86400 in TXT “v=spf1 +a +mx +include:mail-relay.contabo.net ~all”

If you have a special configuration, you can use a tool like this to generate an individual SPF:

SPF-Wizard

Blacklists

We always do test our IP addresses, before we give them to our customers. But it is not impossible, that your IP is currently on a blacklist. This will cause your sending attempts to fail despite all your tries to achieve a perfect configuration. If you assume that your IP might be on such a list, you can test for the most important ones on this site:

MX-Toolbox Blacklist Check

Please enter the IP address of your server and wait some seconds for the test! If the IP is listed somewhere (marked in red), you should contact the owners of this list. They will offer a removal form on their home page. The IP should be removed in a few days. Some e-mail providers have their own lists, that can not be reviewed so easily. They normally will send you a bounce e-mail to signal, that the sending attempt failed, with the reason included in it. If they mention an internal blacklist, you can find below some links to the removal forms of such providers:

Microsoft
Yahoo
Google

If you have problems getting your IP removed from such a list, please write an e-mail with the error message and the IP to support@contabo.com. We will help you solving this problem.

Additional points

If you have paid attention to all the points so far, and your e-mails have still problems with reaching the recipient or are landing in the spam folder, it is time to look for the reason in close detail. Have you got a reply when the e-mail was not accepted? Read this e-mail carefully. Often there stands the reason for this behaviour! If you have found such a message, but it does not help you, you are free to sent it with the complete header to our support. Our team of experts at support@contabo.com has a lot of experience with solving such problems!

If the e-mail is arriving but landing in spam, the header of the received e-mail will often contain useful hints. Especially Google makes it easy for the owners of small e-mail servers and often adds a link to its e-mail guidelines. Therefore, it might be useful to send a test e-mail to a Gmail address too, for a further analysis!

Please also take a look on the Website mail-tester.com. You can send an e-mail to the server here and the site will show you possible optimizations for your server and the e-mails!

Source: https://contabo.com/blog/prevent-e-mails-marked-spam/?utm_source=facebook&utm_medium=managed_social&fbclid=IwAR2WvQL4SIhyyIRMeg6vjgPBJSppK8PUBbOpXJqVBzAefd2SpP4KDA688Hw

0 comments:

Post a Comment