Setting a title for a date to lower SpamAssassin's score

I used the testing service (verifier.port25.com) to check what happens when emails are sent from my PHP script. For some reason, they ended up in my GMail spam folder, even if SPF and DKIM are enabled.

It turns out that the SpamAssassin score was 5.3, which is higher than 5.0. Below you can understand why. The biggest problem is that I have a domain with 12 letters in it (it seems crazy to me that I should be punished for this, but apparently 12-letter domains are popular among spammers). Since I don't want to change my domain, it seems like the next best option is to set a header for the date, but I'm not sure how to do it. Can anyone help with this?

1.0 MISSING_HEADERS Missing: Header

0.0 HTML_MESSAGE BODY: HTML included in the message

-0.5 BAYES_05 BODY: Bayes spam probability is from 1 to 5% [rating: 0.0345]

-0.1 DKIM_VALID_AU The message has a valid DKIM or DK signature from the copyright domain

0.1 DKIM_SIGNED The message has a DKIM or DK signature, optionally valid

-0.1 DKIM_VALID A message has at least one valid DKIM or DK signature

1.4 MISSING_DATE Date missing: header

3.5 FROM_12LTRDOM From a 12-letter domain

Existing array

$headers = array( 'From' => $from, 'Return-Path' => $sender, 'Subject' => $subject ); 
+6
source share
1 answer

Try adding this to your headlines.

 "Date: ".date("r")."\r\n" 

For an array:

 $headers = array( 'From' => $from, 'Return-Path' => $sender, 'Subject' => $subject, 'Date' => date("r") ); 
+8
source

Source: https://habr.com/ru/post/921215/


All Articles