-1

I would like to add the IP of an external SMTP server to an existing SPF record, which is looks like this:

"v=spf1 a mx ip4:185.6.139.6 a:frey.mailpool.1.netmask.hu a:frey.mailpool.2.netmask.hu a:frey.mailpool.3.netmask.hu ~all"

Isn't will it mess up the parts with the "a:frey....." syntaxes, while the current and the new IP belongs to different servers? This would be the most simple way, but it looks too easy:

"v=spf1 a mx ip4:91.82.220.135 ip4:185.6.139.6 a:frey.mailpool.1.netmask.hu a:frey.mailpool.2.netmask.hu a:frey.mailpool.3.netmask.hu ~all" 

Thank you

2
  • it is not clear what you are asking. Can you clarify?
    – Jakuje
    Jan 7, 2016 at 23:30
  • Is there an actual issue here? No, there's nothing wrong with ip4 and a parts coexisting in an SPF record. kitterman.com/spf/validate.html parses your proposed record just fine.
    – ceejayoz
    Jan 7, 2016 at 23:33

1 Answer 1

1

The record, without evaluating for correct IP addresses and URLs, is valid. The only limit I am aware of for SPF is exceeding the maximum string length of a DNS TXT record, which is 255 characters.

RFC 4408 does give some additional guidelines:

3.1.4. Record Size

The published SPF record for a given domain name SHOULD remain small enough that the results of a query for it will fit within 512 octets. This will keep even older DNS implementations from falling over to TCP. Since the answer size is dependent on many things outside the scope of this document, it is only possible to give this guideline: If the combined length of the DNS name and the text of all the records of a given type (TXT or SPF) is under 450 characters, then DNS answers should fit in UDP packets. Note that when computing the sizes for queries of the TXT format, one must take into account any other TXT records published at the domain name. Records that are too long to fit in a single UDP packet MAY be silently ignored by SPF clients.

You may also want to read through the SPF Record Syntax and to better understand available mechanisms and what they do.

Not the answer you're looking for? Browse other questions tagged .