When sending an email, the recipient server may perform an SPF check to verify that the email was sent from an authorized IP address or domain. This check involves the following steps:
1. The recipient server extracts the domain name from the address in the message’s “FROM” header.
1. The server queries the DNS server of the domain to obtain the SPF record.
1. The SPF record of the domain includes a list of authorized IP addresses, domains, or hostnames that are allowed to send messages on behalf of the domain.
1. The recipient server compares the IP address of the incoming message with the authorized IP addresses listed in the domain’s SPF record.
1. If the IP address matches any of the authorized addresses, the SPF check is passed, and the email is considered legitimate.
1. If the IP address does not match any of the authorized addresses, the recipient server may mark the email as spam or reject it altogether.
Overall, the SPF check helps ensure that the sender’s domain has authorized the message’s origin, reducing the likelihood of spam or phishing emails.