Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SpamAssassin negative score for HEADER_FROM_DIFFERENT_DOMAINS

Some emails sent by our sever go to spam for certain recipients. E.g when sent to @outlook.com email addresses.

I have been testing our emails using https://www.mail-tester.com

SpamAssassin gives a score of -0.1 for the issue of 'HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different'

This is the only issue reported. Everything else, such as SPF and DKIM, passes. There is no documentation on their website for this issue and I don't understand what it means or how to fix it.

The email is sent using PHPMailer via AWS SES.

like image 521
AndyW Avatar asked Feb 26 '19 22:02

AndyW


2 Answers

I solved this by completing the setup of 'MAIL FROM' in AWS SES. This set the mail from header in emails to be my domain name.

"HEADER_FROM_DIFFERENT_DOMAINS" and mail-tester.com now gives me a score of 10/10.

Note that for some email providers it took a few weeks before we were trusted and emails stopped going to spam.

like image 61
AndyW Avatar answered Jan 04 '23 15:01

AndyW


It means that the envelope sender address (which is used at the SMTP level) is different to the address used in the From header. This is very common, but can be a problem if you try to implement DMARC alignment. For example, you might send a message with a from header containing [email protected], but your envelope sender might be [email protected]. You should be able to see this in the Return path header of a received message. Whether you can change this depends on exactly how you're sending your message, but in PHPMailer the envelope sender defaults to the from address, and you can override it by setting the Sender property.

A -0.1 penalty is unlikely to be the entire cause of your mail being sent to spam.

like image 23
Synchro Avatar answered Jan 04 '23 16:01

Synchro