Page 1 of 1

SMTP Server discovery (NOT SPAM)

Posted: Thu Jan 18, 2007 4:10 pm
by farinspace
background: I'm creating a blacklist checker, the user enters a domain or IP address and ithe script checks against several DNSBLs. This assumes the use knows what his/her mail server domain and IP address is.

Typically the mail server is setup on the server itself (so I believe) ... so i can instruct the user to enter the domain after the @ sign. This isnt always the case as there can be one mail server to hand mail for several domains ...

Is there a way to discover what the SMTP server is for a specific domain, or is this just impossible ?

Posted: Thu Jan 18, 2007 4:46 pm
by feyd
The MX records related to the domain?

getmxrr()
dns_get_record() may prove useful too.

Posted: Thu Jan 18, 2007 4:54 pm
by farinspace
ya, but i think MX will get incoming mail servers (servers receiving mail for the domain) ... but even through DNS records i dont think i can get outgoing mail server for the domain ...