tags:

views:

193

answers:

4

Is it possible to find POP3 server address for any given email id (like [email protected])? If yes, please provide some guidance preferably in PHP or .Net.

Edit : I get addresses by querying MX record but those are not always the same which people use to fetch their emails.

A: 

I don't think so; at least, not in a general way. Emails are just forwarded on to the right domain, and handled internally. For instance, my email address is stored on a server that provides both IMAP and POP access, and also forwarded to a webmail provider, who provide IMAP and POP access. So the question 'what's its POP3 server?' doesn't really make sense.

Steve Cooper
A: 

No, not really. It is however possible to find an smtp server for an email address. It is really not specific to any programming language, but the way you would go about it would be extract domain from email address (eg. [email protected] => somedomain.com) and then make a dns query with type=MX. This will return the servers that accept mails for that domain, in order of priority.

klausbyskov
A: 

If the question is, "For any given email address is there an automatic way to find the address of a POP3 server for it?" I'd say the answer is no.

Some people perhaps don't have POP3 access to their emails at all, and many people such as myself have our own domain hosted at a service provider and the POP3/IMAP servers are under the service provider's domains.

FalseVinylShrub
+3  A: 

I don't think you can "guess" the POP3 server for any email address and be right each time, no : the POP3 server can either :

  • be something like pop.thedomainnameintheaddress
  • or something totally different, like ssl.hostingcompany.com

In the first case, you could try to guess -- and sometimes be right... But in the second, you don't stand quite a chance.


You might want to take a look at Thunderbird 3 : I think it includes some auto-configuration mecanism about that : you enter your e-mail address, and it tries to find the POP server for your.

Not sure how it works, but I suppose there is a database containning that kind of informations, that Thunderbird sends requests to ; that would be the "best" solution, I'd say, as it can be updated without having to change Thunderbird itself, and doesn't rely on "guessing".


About Thundrbird's autoconfiguration mecanism, here's an interesting link : https://wiki.mozilla.org/Thunderbird:Autoconfiguration#Implementation -- especially the third point, which links to a directory where you can find configuration files for lots of domains.

For instance : https://live.mozillamessaging.com/autoconfig/gmail.com
Gets you an XML file indicating how Thunderbird has to be configured for @gmail.com emails.

And there's quite a couple of configuration files for other domains -- so this might be an interesting idea, at least for "well-known" domains ;-)

Of course, this doesn't solve the problem for non-well-known domains...

Pascal MARTIN