Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regexp for SPF "IN TXT" in domain zone files

Status
Not open for further replies.

chrisparr21681

Programmer
Nov 18, 2002
17
GB
My DNS zone files are update by a perl script and I am trying to parse an "IN TXT" record for adding SPF entries, but I want to make sure that the SPF record conforms to the RFC 1464 standard.

I am under the impression that the basic standard is that any ASCII character is allowed, but the record must contain an =, there must be 1+ character(s) before and after the =, and that whitespace must be escaped with a ` -- well, im not TOO sure, but you can always check in the RFC - there are a couple of other rules, but the RFC is very verbose.

The problem is I am very bad with regular expressions and am certain to make a complete hash of it.

Any takers?
 
well show us a file and tell us what you want to get out of it with a regex, and we might be able to help.

RFC?? toooo much imformation.......


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
I agree with perluserpengo. I'm not going go read the RFC to figure it out mate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top