SPFRecordValidator
class SPFRecordValidator implements DnsRecordValidatorInterface (View source)
SPF record validator
Validates Sender Policy Framework (SPF) records according to:
- RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Email (April 2014)
- RFC 4408: Sender Policy Framework (SPF) (obsoleted by RFC 7208)
SPF records allow domain owners to specify which hosts are authorized to send email on behalf of their domain. The record format is defined in RFC 7208, starting with "v=spf1" followed by mechanisms and modifiers.
IMPORTANT: As per RFC 7208 Section 14.1, the SPF record type is deprecated. SPF records should be published as TXT records, not as SPF type records.
Methods
validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)
Validates SPF record content
Details
__construct(ConfigurationManager $config)
No description
ValidationResult
validate(string $content, string $name, mixed $prio, int|string|null $ttl, int $defaultTTL, mixed ...$args)
Validates SPF record content