I’ve seen this done before by Mozilla Thunderbird, and most likely other email clients. What I’m looking to do is take an email address, and find the hosts method (IMAP, POP3 etc – I’m not sure what this is actually called), port, and address.
Is there any relatively easy way of doing this via an extension, or solid external API?
(P.S. I know this isn’t done via regex e.g. all *@googlemail.com, as domains that I have with mailservers located at Google via Google Apps, still resolve to Google’s details) .
Any answers, comments, advice would be greatly appreciated!
Tbird isn’t doing anything special – given your email address, it can make a few guesses as to what your SMTP, IMAP/POP3 server addresses are and do some probing to find out which of those guesses is right.
Pretending your address is someone@example.com, Tbird will see if
example.comhas an IP mapping and probe any server found at that IP. If no email-related ports response, then it checks for example.com’s public MX servers, and probes those. It could even try some obvious defaults for servernames, like mail.example.com, pop.example.com, etc…Only after all of its guesses are exhausted would it come back and say “you’ll have to tell me yourself, I can’t figure it out”.