Vad är SPF?

Vad är SPF?

What Is SPF?

Den Sender Policy Framework (SPF), is a technical standard and autentisering av e-post technique that helps protect email senders and recipients from spam, spoofing, and phishing.

Förstå SPF

The Sender Policy Framework (SPF), is a technical standard and email authentication technique that helps protect email senders and recipients from spam, spoofing, and phishing.

Det definierar ett sätt att verifiera att ett e-postmeddelande skickats från en auktoriserad e-postserver för att upptäcka förfalskningar och förhindra skräppost. Det har utformats för att komplettera SMTP, det grundläggande protokoll som används för att skicka e-post, eftersom SMTP i sig inte innehåller några autentiseringsmekanismer.

Hur fungerar SPF?

SPF establishes a method for receiving mail servers to verify that incoming email from a domain was sent from a host authorized by that domain’s administrators. It piggybacks on the well-established Domain Name System (DNS). In general terms, the process works like this:


  1. En domänadministratör publicerar den policy som definierar vilka e-postservrar som är behöriga att skicka e-post från den aktuella domänen. Den här policyn kallas för en SPF-post och listas som en del av domänens övergripande DNS-poster.

  2. När en inkommande e-postserver tar emot ett inkommande e-postmeddelande söker den upp reglerna för bounce-domänen (Return-Path) i DNS. Den inkommande servern jämför sedan avsändarens IP-adress med de auktoriserade IP-adresser som definieras i SPF-posten.

  3. Den mottagande e-postservern använder sedan de regler som anges i den avsändande domänens SPF-post för att avgöra om e-postmeddelandet ska accepteras, avvisas eller flaggas på annat sätt.

Vad är en SPF-post?

En SPF-post ingår i en organisations DNS-databas. En SPF-post är en specialformaterad version av en standard DNS TXT-post. En SPF-post ser ut ungefär så här:

mydomain.com   TXT   "v=spf1 include:myauthorizeddomain.com include:sparkpostmail.com ~all”


Reading left-to-right in plain Engelska, this record is saying that any email that claims to be from “mydomain.com” should be validated with SPF (that’s the “v=spf1” prefix till record). It then specifies that the SPF records for “myauthorizeddomain.com” and “sparkpostmail.com” also should be included when validating email from mydomain.com (those are the parts labeled “include:”). In practical terms, that usually is done to indicate that the other domains authorized to send email on its behalf. Finally, the record concludes by stating that any other servers claiming to send mail should be flagged as questionable, and possibly failing, the SPF test (“~all”).


SPF-poster kan vara mer komplicerade än det här exemplet, men den grundläggande mekanismen är densamma.

Hur är SPF relaterat till DKIM, DMARC eller andra standarder?

SPF, DKIM och DMARC är alla standarder som möjliggör olika aspekter av autentisering av e-post. De behandlar frågor som kompletterar varandra.


  • Med SPF kan avsändaren definiera vilka IP-adresser som får skicka e-post för en viss domän.

  • DKIM provides an encryption key and digital signature that verifies that an email message was not faked or altered.

  • DMARC unifies the SPF and DKIM authentication mechanisms into a common framework and allows domain owners to declare how they would like email from that domain to be handled if it fails an authorization test.

Behöver jag SPF?

If you are a business sending commercial or transactional email, you definitely need to implement one or more forms of email authentication to verify that an email is actually from you or your business. Properly configuring email authentication standards like SPF is one of the most important steps you can take to improve your deliverability. However, SPF by itself only goes so far; SparkPost and other email experts recommend also implementing DKIM and DMARC to define a more complete email authentication policy.

Har SparkPost stöd för SPF?

Yes. SparkPost implements and adheres to email authentication standards including SPF. In fact, SparkPost handles the SPF part of that automatically, so all email from your account is already SPF-compliant.

Hur kan jag verifiera mina SPF-inställningar?

SparkPost’s free email tools for developers make working with email authentication standards like SPF easy. Our SPF-inspektör lets you quickly check who’s authorized to send email for your domain. And our SPF Builder is an easy way to create a working SPF record for your domain.

Läs mer om bästa praxis för SPF

Learn more about SPF with these resources from SparkPost’s email experts and elsewhere on the web.


Your new standard in Marketing, Betalningar & Sales. It's Bird

The right message -> till right person -> vid right time.

By clicking "See Bird" you agree to Bird's Meddelande om integritet.

Your new standard in Marketing, Betalningar & Sales. It's Bird

The right message -> to the right person -> vid right time.

By clicking "See Bird" you agree to Bird's Meddelande om integritet.