You may have encountered a situation where your email inbox, including the domain mailbox, starts filling up with error messages about undeliverable emails from addresses that don't actually exist on your domain. This usually means that someone is abusing your domain to send spam. While it's impossible to completely prevent such abuse, you can significantly reduce it. It's crucial to limit spam because prolonged spam activity can lead to worse penalties from search engines and ISPs. One effective way to limit spam is by implementing SPF (Sender Policy Framework).
SPF allows you to define who can send emails from your domain and how. SPF records are set up on DNS servers using a TXT DNS record. By implementing SPF, you enhance the credibility of your emails/domain and reduce spam.
Examples:
-
"v=spf1 -all" If you use hosting without email services, you can set this record, and all emails will be marked as SPAM or discarded by recipients.
-
"v=spf1 mx -all" This record indicates that all MX servers listed in the DNS record are trustworthy. It also specifies that all servers outside of the MX servers for the domain are untrusted, and emails from these servers will be marked as SPAM or deleted.
-
"v=spf1 ip4:192.168.0.1/16 -all" This record specifies that all MX servers within the IP address range 192.168.0.1 - 192.168.255.255 are trusted. All others are considered untrusted.
SPF supports many additional conditions. You can find more syntax information at https://www.openspf.org/SPF_Record_Syntax.
SPF Record for MyDreams Servers:v=spf1 a mx +ip4:178.238.41.64/26 +ip4:85.118.130.64/26 +ip4:83.167.253.128/25 +ip4:149.62.151.128/26 +ip4:46.19.36.211 ~all