Is it possible to use them in the same SPF record? For example:
Value TXT: v=spf1 mx a ptr ip4:46.16.60.0/23 a:cdmon.com mx:mail.solarmora.com include:srv.cat ~all
Is it possible to use them in the same SPF record? For example:
Value TXT: v=spf1 mx a ptr ip4:46.16.60.0/23 a:cdmon.com mx:mail.solarmora.com include:srv.cat ~all
Yes, you can all those keywords combined, just make sure you don't hit the lookup limit of at maximum 10 address records lookups: https://www.rfc-editor.org/rfc/rfc7208#section-4.6.4
include
keywords includes the referenced SPF record, which is:Whereas
a:include
leads to an error as the domaininclude
does not exist.It is technically possible to mix any mechanisms, but anything other than the
ip4
andip6
mechanisms will cause additional DNS lookups, and there is the overall limit of 10 DNS queries (RFC 7208, 4.6.4). Everya
causes one additional lookup and everymx
several, depending on the amount of MX servers behind it. Also, aninclude
might have chained mechanism that are also counted to the limit.You should carefully think which servers really send email from the domain as an envelope sender and limit your SPF record to only contain the required servers. As your SPF record is now put together it seems you do not have this knowledge and try and add everything "just in case". The policy ends with
~all
, which makes everything else only softfail. This does not prevent abuse efficiently; consider using-all
, instead.Also, do not use
ptr
(RFC 7208, 5.5):