SMTP Server discovery (NOT SPAM)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
farinspace
Forum Newbie
Posts: 6
Joined: Thu Jan 18, 2007 4:00 pm

SMTP Server discovery (NOT SPAM)

Post 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 ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The MX records related to the domain?

getmxrr()
dns_get_record() may prove useful too.
farinspace
Forum Newbie
Posts: 6
Joined: Thu Jan 18, 2007 4:00 pm

Post 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 ...
Post Reply