How to Pass SpamAssassin Checks with Your Emails

Content:

SpamAssassin is a widely used spam filter, which takes action against spam emails before the user is able to see the message.

SpamAssassin uses a vast number of checks, assigning a score to each email checked. A score above a certain threshold will cause the email to be marked as spam.

You can check your emails using mail tester, which assigns a SpamAssassin score to your email. It’s a great way to check your email server configuration, and ensure your emails have the best chance possible to reach the inbox of the recipient.

To learn more about using mail tester, check out our article.

This article will go over a few common issues flagged up by SpamAssassin, and how you can fix them to improve your email score. Bare in mind, these issues alone will unlikely be enough for your email to be classed as spam, but the score will soon add up if an email fails multiple checks.

Missing To: Header

This one’s an easy one, and it’s not necessary to ‘fix’ anything here.

When we sent the message through telnet, we specified the recipient address using rcpt to. SpamAssassin also looks for a To header inside the message.

To include this, add the line

To: {recipient address}

between the data and Subject lines. Our mail client will deal with this later on, so you don’t need to worry about this.

Dynamic Address Errors

There are a few issues that could crop up relating to the use of a dynamic IP address.

Mail tester dynamic IP issues
Issues due to a dynamic IP address

Unfortunately, there’s little you can do about this, save for asking your ISP/mail server host for a fixed IP address.

ISPs generally rotate their IP addresses every so often, so your IP address is not fixed. It’s unlikely they will give you a fixed one – that’s usually reserved for business customers.

The good thing it this shouldn’t have much of an impact. With our DKIM/DMARC/SPF configured correctly, it’s unlikely that the dynamic IP address will have enough of an impact to push our emails into the spam box.

Content Issues

There are several content-related issues which will be flagged by SpamAssassin. These checks are triggered by common features found in spam emails, but it’s possible to inadvertently trigger one of these if you’re unaware of them.

If you’re using images in your emails, make sure at least 2/3 of the email content is text. It’s common for spam emails to be sent entirely as an image, to bypass text-based triggers. For this reason, SpamAssassin will add to your score if your email is heavily image focused.

A further filter to block image-based email message will increase your spam score if the images in your emails contain a high number of words. While email clients can’t scan images for text, SpamAssassin can. This doesn’t mean you can’t include images containing text – just avoid sending large text blocks as images.

Your message length is another important consideration. SpamAssassin will flag emails with particularly short messages, completely empty messages, or messages containing placeholder text (e.g. Lorem ispum…). This shouldn’t be a problem when writing genuine messages, but may show up in testing.