Search Postgresql Archives

Re: Email Verfication Regular Expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Cristian" == Cristian Prieto <cristian@xxxxxxxxxxxxxxx> writes:

Cristian>  res = res_query(name, C_IN, T_MX, answer, sizeof(answer));

This incorrectly fails if an address has an "A" record but no "MX"
record.  According to RFC 2821 Section 5:

   The lookup first attempts to locate an MX record associated with
   the name.  If a CNAME record is found instead, the resulting name
   is processed as if it were the initial name.  If no MX records are
   found, but an A RR is found, the A RR is treated as if it was
   associated with an implicit MX RR, with a preference of 0, pointing
   to that host.

So, your function will say "no good" if the domain has an A record but
no MX record, even though the RFC says that's OK and deliverable.

Man, is there a lot of bogus knowledge and cargo culting around this
subject!

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxxxxxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux