Re: Email validator and mx records for subdomains
Jason Culverhouse <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
On Mar 5, 2007, at 6:37 PM, Jacob Smullyan wrote: > 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? >> The MTA is going to look up the MX records the walk the list from lowest to highest priority. If no MX record is found, you look for an A record and if that exists try to deliver the email. The MTA on the other side has the rules to convert spam-oupH28X6K0VWk0Htik3J/[email protected] to spam-B7e/[email protected] and will reply with the corrected name in the RCPT TO. You don't walk the domain list. >> 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 > _______________________________________________ > FormEncode-discuss mailing list > FormEncode-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/formencode-discuss ------------------------------------------------------------------------- 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 _______________________________________________ FormEncode-discuss mailing list FormEncode-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/formencode-discuss