6

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.

AndyW
  • 748
  • 2
  • 8
  • 18

3 Answers3

7

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.

mrm
  • 3,973
  • 2
  • 24
  • 26
AndyW
  • 748
  • 2
  • 8
  • 18
1

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 user@example.com, but your envelope sender might be bouncehandler@mail.example.com. 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.

Synchro
  • 29,823
  • 14
  • 69
  • 85
  • thanks. SetFrom() and Sender are both set to the same thing in the PHP code. I have included the message source of an email in the question if that helps. There is a lot of reference to amonses.com which could be the cause of this? However if like you say that this may not be the actual reason for always going to spam then I am stumped as everything else passes apparently. – AndyW Feb 27 '19 at 11:51
1

Its outlooks rubbish filtering system. They have "AI" rules that look at the sending ip address for reputation. They score you on user reportsand lots of other bits they will not tell you about. Make sure you have SPF, DMARC, DKIM, and sign up for their JMRP and SDNS they will tell you. But it still is a game of cat and mouse. Its a slippery slope and even Microsoft trap their own mail to their own outlook users. PITA, to be honest and luckily we managed to get a mitigation to the issue. However some users in different domains still complain of email going to JUNK. Go figure. I hate having to work on issues with Outlook.com. They themselves send out spam and have the audacity to block well configured SMTP senders.

I wish you luck. You will need it.

  • I have done all the above suggestions and still no luck in regard to outlook spam. We even upgraded to AWS developer account to make sure everything was setup correctly, but they could do nothing to help with outlook spam. Currently the UI work around is check the email is Microsoft and prompt user to check spam folder if so, not really an ideal solution. Hoping that eventually the Microsoft mail servers mark us as not spam if enough users move our emails out of spam. PITA indeed... – AndyW May 14 '19 at 14:03