Nowadays, it is hard to prevent email from going to junk mail if you intend to spam. Most mail servers on the internet deploy spam detection and filtering software that use complex algorithms to detect spammers. The software can tell if you are a spammer from the content of your emails. But if you design your email sending software carefully, you can reduce the probability of your email going to junk. Here are some basic tips.
Add From:, To: Subject: Date: headers to the message. Although they are not necessary, your email is almost definitely going to spam folder without them. The Date header is often ignored but it really matters.
Don’t just create a text/html body. Otherwise, SpamAssassin will detect this as
1 |
MIME_HTML_ONLY BODY: Message only has text/html MIME parts |
Even you want HTML email content, you’d better create another text/plain mime part and make the email a multi-part email. For the text/html MIME part, you should enclose the html content with <html> and </html> tags. Otherwise, you will get
1 2 |
HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag |
All these contribute the spam score.
Add SPF/DKIM /RDNS PTR record to DNS. The importance of SPF/DKIM/Reverse DNS can be seen in the following report of some spam detection software(these are the headers added to your email message by the spam detection software).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
X-Spam-Status: No, score=-0.2 X-Spam-Score: -1 X-Spam-Bar: / X-Ham-Report: Spam detection software, running on the system "lax.hawkhost.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see root\@localhost for details. Content preview: after add date header Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: domainhostseotool.com] X-Spam-Flag: NO |
Here is a spam detection report from port25.com.(You can get the report by sending an email to check-auth@verifier.port25.com)
This message is an automatic response from Port25′s authentication verifier
service at verifier.port25.com. The service allows email senders to perform
a simple check of various sender authentication mechanisms. It is provided
free of charge, in the hope that it is useful to the email community. While
it is not officially supported, we welcome any feedback you may have at
<verifier-feedback@port25.com>.
Thank you for using the verifier,
The Port25 Solutions, Inc. team
==========================================================
Summary of Results
==========================================================
SPF check: pass
“iprev” check: pass
DKIM check: pass
SpamAssassin check: ham
To avoid being flagged by outlook.com, you can follow the tips in this post and this post. To prevent emails delivered to gmail from being sent to spam, follow the best practice from google.
You need to warm up a new ip before sending maximum volume. The sending limit for new ip is 60-600 per hour for yahoo.com, 5000 per hour for hotmail.com.