Mailing List Archive

RE: Question about spf tests on http://www.midwestcs.com/spf/tests
Roger thanks,

I've read RFC 1034/1035 which the SPF draft refers to and these state:

<domain> ::= <subdomain> | " "
<subdomain> ::= <label> | <subdomain> "." <label>
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig> ::= <letter> | <digit>
<letter> ::= any one of the 52 alphabetic characters A through Z in
upper case and a through z in lower case
<digit> ::= any one of the ten digits 0 through 9

Note that while upper and lower case letters are allowed in domain
names, no significance is attached to the case. That is, two names with
the same spelling but different case are to be treated as if identical.

The labels must follow the rules for ARPANET host names. They must
start with a letter, end with a letter or digit, and have as interior
characters only letters, digits, and hyphen. There are also some
restrictions on the length. Labels must be 63 characters or less.

So my take on this is that legal characters are "A-Z", "a-z", "0-9", "-",
".".

There does seem to have been some changes (perhaps because of the confusion
between hostname & domain name), where underscore ("_") is a permitted
character in a hostname, but the SPF draft doesn't refer to that, it
specifically (in Appendix A. Collection ABNF for SPF records) states:

A = "a" [ ":" domain-sepc ] [ dual-cidr-length ]
:
:
domain-spec = domain-name / macro-string
domain-name = domain-part * ( "." domain-part ) [ "." ]
domain-part = as defined in [RFC1034]

And here is my problem. I can't see from 1034 where the acceptance of "/"
is in the domain name, hence my confustion!

Must be doing something wrong... better get on with reading all the RFCs
again :-)

<<snip>>

-Gary

This message (and any associated files) is intended only for the use of spf-devel@v2.listbox.com and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not spf-devel@v2.listbox.com you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored. Any views or opinions presented are solely those of the author gary@exclaimer.net and do not necessarily represent those of the company.

This disclaimer was added by eXclaimer for Microsoft Exchange 2000, a DCSL product. Please visit our web site at www.exclaimer.co.uk for more information.

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Question about spf tests on http://www.midwestcs.com/spf/tests [ In reply to ]
In <F8613B5F9C388242BDABF11AF6ED123F04FB18@MAIL1.dcsl.local> "Gary Levell" <gary@exclaimer.net> writes:

> So my take on this is that legal characters are "A-Z", "a-z", "0-9", "-",
> ".".
>
> [...]
>
> Must be doing something wrong... better get on with reading all the RFCs
> again :-)


There is a newer RFC that clears up the differences between host names
and domain names. In particular, that old spec would allow for things
like 3com.com or _ep.microsoft.com, or many other domain names.

I'll see if I can dig up the correct reference later today.

-wayne

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Question about spf tests on http://www.midwestcs.com/spf/tests [ In reply to ]
Would appreciate the newer spec as it would help to get closer to
finishing the Java version too.

Currently I assume, when parsing these records, that if a / or // is
found then check to see if if the value is a number. If it is then
assume it is CIDR. Error if it is not in the correct range. Otherwise
assume it is all part of the domain.

I still have a TODO on the FQDN checking as there doesn't seem to be a
formula for it, well RFC 1034/1035 doesn't work at least.

Regards
Roger

wayne wrote:

>
> In <F8613B5F9C388242BDABF11AF6ED123F04FB18@MAIL1.dcsl.local> "Gary
> Levell" <gary@exclaimer.net> writes:
>
> > So my take on this is that legal characters are "A-Z", "a-z", "0-9",
> "-",
> > ".".
> >
> > [...]
> >
> > Must be doing something wrong... better get on with reading all the RFCs
> > again :-)
>
>
> There is a newer RFC that clears up the differences between host names
> and domain names. In particular, that old spec would allow for things
> like 3com.com or _ep.microsoft.com, or many other domain names.
>
> I'll see if I can dig up the correct reference later today.
>
> -wayne

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: Question about spf tests on http://www.midwestcs.com/spf/tests [ In reply to ]
Sorry for not getting back to you guys yesterday...


In <40C835DF.2060306@mimecast.net> beta <rjf@mimecast.net> writes:

> wayne wrote:
>
>>
>> In <F8613B5F9C388242BDABF11AF6ED123F04FB18@MAIL1.dcsl.local> "Gary
>> Levell" <gary@exclaimer.net> writes:
>>
>> > So my take on this is that legal characters are "A-Z", "a-z", "0-9", "-",
>> > ".".

You might want to take a close look at RFC1035 again. In particular,
right before the BNF description, there is this text:

2.3.1. Preferred name syntax

The DNS specifications attempt to be as general as possible in the rules
for constructing domain names. The idea is that the name of any
existing object can be expressed as a domain name with minimal changes.

However, when assigning a domain name for an object, the prudent user
will select a name which satisfies both the rules of the domain system
and any existing rules for the object, whether these rules are published
or implied by existing programs.

For example, when naming a mail domain, the user should satisfy both the
rules of this memo and those in RFC-822. When creating a new host name,
the old rules for HOSTS.TXT should be followed. This avoids problems
when old software is converted to use domain names.

The following syntax will result in fewer problems with many
applications that use domain names (e.g., mail, TELNET).

[BNF snipped]

Note that even RFC1035 talks about the differences between *domain*
names and *host* names. In particular, if you are going to use a
domain name for email, it must comply with both the requirements of
SMTP and of DNS. SMTP has additional restrictions. SPF records use
domain names, and therefore do not have as many restrictions.


>> There is a newer RFC that clears up the differences between host names
>> and domain names. In particular, that old spec would allow for things
>> like 3com.com or _ep.microsoft.com, or many other domain names.


Ok, I found the RFC that clarifies the names issue. See:
rfc2181 section 11 "Name syntax"

Also, there is at least one RFC that suggests you use a slash in a
domain name. See: rfc2317

Also, while poking around for hostname RFCs, I found:
rfc2100

I would like to admonish Meng for allowing the important URL
http://www.seas.upenn.edu/~mengwong/coolhosts.html to become invalid.
Shame!

Fortunately, you can still find a copy at:
http://www.linuxmafia.com/pub/humour/coolhosts.html

Personally, I really like Tony Finch's email address of dot@dotat.at


> Currently I assume, when parsing these records, that if a / or // is
> found then check to see if if the value is a number. If it is then
> assume it is CIDR. Error if it is not in the correct range. Otherwise
> assume it is all part of the domain.

I think a strict reading the the SPF BNF says that you really need to
parse the CIDR notation from the right end of the domain. That is,
a:london/18.foo.com/24 has a domain name of "london/18.foo.com" and a
CIDR block value of 24. If you just look for the "/" and then see if
there is a number after it, you might find a CIDR value of 18.


-wayne

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com