Re: Email validator and mx records for subdomains
"Jacob Smullyan" <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
On 3/5/07, Ian Bicking <[email protected]> wrote: > Jacob Smullyan wrote: > > Today someone tried to submit a form on one of the websites I > > maintain, entering an email address of the form > > "soandso-gifGjc5/[email protected]". The Email validator, set to check mx, > > rejected this because forums.nyu.edu doesn't have an MX record. > > However, nyu.edu does and the mail would in fact be delivered. > > > > I'm not quite sure of what validation behavior would be most correct > > and/or useful. Would it be better if the validator first tried > > d0.d1...dn.edu, then d1...dn.edu, then finally dn.edu for mx records? > > MTAs will start looking up higher-level DNS when there's nothing lower > down? That seems pretty weird. Is it actually that it's only looking > up MX, when it should look up MX and then a normal domain? I think the > behavior is usually to fall back on the normal DNS when there's not MX > record. You must be right. > Oddly, I can't figure out what the simple way to lookup a DNS record in > pyDNS is. Just use DnsRequest, I think: DNS.ParseResolvConf() a=[x['data'] for x in DNS.Base.DnsRequest(domain).req().answers if x['typename']=='A'] or something similar. -- Jacob Smullyan office: 212/669-3230 mobile: 917/576-5274 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV