For my domain I use mail at the registrar. The registrar's instructions indicated how to set up an SPF record. Accordingly, I added it and it looks like this:
"v = spf1 redirect = _spf.mailhostbox.com"
I need to use https://mandrill.com/ to send mail and at the same time use the standard capabilities of the mailbox - to receive letters, send them using the Mail client.
In documentation https://mandrill.com/ there is about setting SPF records:
Accordingly, I modified the record:
"v = spf1 redirect = _spf.mailhostbox.com include: spf.mandrillapp.com"
But in the validator, you get the error: PermError SPF Permanent Error: Missing IP4: 18.104.22.168/22
Before this was a record of the form:
"v = spf1 redirect = _spf.mailhostbox.com include: spf.mandrillapp.com? all"
But after a while I could not enter the mail using my password. Is it possible that this is due to incorrect SPF recording?
How to set it up correctly?
v=spf1 ip4:XXX.XXX.XXX.XXX +all
If you do not need to send from your server, we remove ip4 / ip6. With this setting, I personally work both directly and through the mandrill. In this case, in the secure record, we are telling the receiving server (which will be checking the spf), that we allow this ipishnik to send mail on behalf of our domain. The parameter + oll says that the rest are responsible for themselves, i.e. Mandrill will show his spfs (and the receiving server will check them).
There will be questions - write :)