How to auto detect a remote IMAP/POP3 server given only an email
How to auto detect a remote IMAP/POP3 server given only an email
am 28.12.2007 18:19:35 von michealp
I want to be able to allow people to check their email from my PHP
online application.
Given only the users 1) email address, 2) username (if applicable) and
3) password - how can I auto detect a remote IMAP/POP3 server so that
I can connect and fetch mail for the user. (Ultimately, I don't want
users to have to know what the IMAP/POP3 server name / port is .... I
would like to auto-detect all of that).
At first I thought I could use "getmxrr" but quickly realized that is
only good for determining the SMTP server.
If anyone has ever "add account" in Gmail Preferences, it's
essentially the exact same functionality where Gmail auto-detects the
IMAP/POP3 server.
Any help will be greatly appreciated.
Re: How to auto detect a remote IMAP/POP3 server given only an email address ?
am 28.12.2007 18:54:15 von Csaba
"mp-" wrote in message
news:b4eb9c5a-427c-4b93-90a0-b0a97d335a06@x29g2000prg.google groups.com...
>I want to be able to allow people to check their email from my PHP
> online application.
>
> Given only the users 1) email address, 2) username (if applicable)
> and
> 3) password - how can I auto detect a remote IMAP/POP3 server so
> that
> I can connect and fetch mail for the user. (Ultimately, I don't
> want
> users to have to know what the IMAP/POP3 server name / port is ....
> I
> would like to auto-detect all of that).
>
> At first I thought I could use "getmxrr" but quickly realized that
> is
> only good for determining the SMTP server.
>
> If anyone has ever "add account" in Gmail Preferences, it's
> essentially the exact same functionality where Gmail auto-detects
> the
> IMAP/POP3 server.
>
> Any help will be greatly appreciated.
Just try to connect to the server.
POP3 and IMAP use different port numbers, so if either one does not
work you try the other.
Richard.
Re: How to auto detect a remote IMAP/POP3 server given only an email
am 28.12.2007 23:49:44 von michealp
On Dec 28, 11:54 am, "Richard" wrote:
> "mp-" wrote in message
>
> news:b4eb9c5a-427c-4b93-90a0-b0a97d335a06@x29g2000prg.google groups.com...
>
>
>
> >I want to be able to allow people to check their email from my PHP
> > online application.
>
> > Given only the users 1) email address, 2) username (if applicable)
> > and
> > 3) password - how can I auto detect a remote IMAP/POP3 server so
> > that
> > I can connect and fetch mail for the user. (Ultimately, I don't
> > want
> > users to have to know what the IMAP/POP3 server name / port is ....
> > I
> > would like to auto-detect all of that).
>
> > At first I thought I could use "getmxrr" but quickly realized that
> > is
> > only good for determining the SMTP server.
>
> > If anyone has ever "add account" in Gmail Preferences, it's
> > essentially the exact same functionality where Gmail auto-detects
> > the
> > IMAP/POP3 server.
>
> > Any help will be greatly appreciated.
>
> Just try to connect to the server.
> POP3 and IMAP use different port numbers, so if either one does not
> work you try the other.
>
> Richard.
Richard
Thanks for the reply. I guess my question is, how do I figure out the
server imap/pop3 with only knowing the persons email address?
Re: How to auto detect a remote IMAP/POP3 server given only an email address ?
am 28.12.2007 23:57:11 von Csaba
"mp-" wrote in message
news:b56243f0-6f0e-40d4-9793-87fb440282d7@e23g2000prf.google groups.com...
> On Dec 28, 11:54 am, "Richard" wrote:
>> "mp-" wrote in message
>>
>> news:b4eb9c5a-427c-4b93-90a0-b0a97d335a06@x29g2000prg.google groups.com...
>>
>>
>>
>> >I want to be able to allow people to check their email from my PHP
>> > online application.
>>
>> > Given only the users 1) email address, 2) username (if
>> > applicable)
>> > and
>> > 3) password - how can I auto detect a remote IMAP/POP3 server so
>> > that
>> > I can connect and fetch mail for the user. (Ultimately, I don't
>> > want
>> > users to have to know what the IMAP/POP3 server name / port is
>> > ....
>> > I
>> > would like to auto-detect all of that).
>>
>> > At first I thought I could use "getmxrr" but quickly realized
>> > that
>> > is
>> > only good for determining the SMTP server.
>>
>> > If anyone has ever "add account" in Gmail Preferences, it's
>> > essentially the exact same functionality where Gmail auto-detects
>> > the
>> > IMAP/POP3 server.
>>
>> > Any help will be greatly appreciated.
>>
>> Just try to connect to the server.
>> POP3 and IMAP use different port numbers, so if either one does not
>> work you try the other.
>>
>> Richard.
>
>
> Richard
>
> Thanks for the reply. I guess my question is, how do I figure out
> the
> server imap/pop3 with only knowing the persons email address?
>
The mailserver should be in DNS, not?
R.
Re: How to auto detect a remote IMAP/POP3 server given only an email address ?
am 29.12.2007 00:04:13 von Csaba
"Richard" wrote in message
news:47757f53$0$22336$dbd4f001@news.euronet.nl...
>
> "mp-" wrote in message
> news:b56243f0-6f0e-40d4-9793-87fb440282d7@e23g2000prf.google groups.com...
>> On Dec 28, 11:54 am, "Richard" wrote:
>>> "mp-" wrote in message
>>>
>>> news:b4eb9c5a-427c-4b93-90a0-b0a97d335a06@x29g2000prg.google groups.com...
>>>
>>>
>>>
>>> >I want to be able to allow people to check their email from my
>>> >PHP
>>> > online application.
>>>
>>> > Given only the users 1) email address, 2) username (if
>>> > applicable)
>>> > and
>>> > 3) password - how can I auto detect a remote IMAP/POP3 server so
>>> > that
>>> > I can connect and fetch mail for the user. (Ultimately, I don't
>>> > want
>>> > users to have to know what the IMAP/POP3 server name / port is
>>> > ....
>>> > I
>>> > would like to auto-detect all of that).
>>>
>>> > At first I thought I could use "getmxrr" but quickly realized
>>> > that
>>> > is
>>> > only good for determining the SMTP server.
>>>
>>> > If anyone has ever "add account" in Gmail Preferences, it's
>>> > essentially the exact same functionality where Gmail
>>> > auto-detects
>>> > the
>>> > IMAP/POP3 server.
>>>
>>> > Any help will be greatly appreciated.
>>>
>>> Just try to connect to the server.
>>> POP3 and IMAP use different port numbers, so if either one does
>>> not
>>> work you try the other.
>>>
>>> Richard.
>>
>>
>> Richard
>>
>> Thanks for the reply. I guess my question is, how do I figure out
>> the
>> server imap/pop3 with only knowing the persons email address?
>>
>
> The mailserver should be in DNS, not?
>
> R.
Oh... oops. I understand now. :S
I think most would try to guess. As far as I know there is not a
standard for that.
Richard
Re: How to auto detect a remote IMAP/POP3 server given only an email
am 29.12.2007 00:21:00 von michealp
On Dec 28, 5:04 pm, "Richard" wrote:
> "Richard" wrote in message
>
> news:47757f53$0$22336$dbd4f001@news.euronet.nl...
>
>
>
>
>
> > "mp-" wrote in message
> >news:b56243f0-6f0e-40d4-9793-87fb440282d7@e23g2000prf.googl egroups.com...
> >> On Dec 28, 11:54 am, "Richard" wrote:
> >>> "mp-" wrote in message
>
> >>>news:b4eb9c5a-427c-4b93-90a0-b0a97d335a06@x29g2000prg.goo glegroups.com...
>
> >>> >I want to be able to allow people to check their email from my
> >>> >PHP
> >>> > online application.
>
> >>> > Given only the users 1) email address, 2) username (if
> >>> > applicable)
> >>> > and
> >>> > 3) password - how can I auto detect a remote IMAP/POP3 server so
> >>> > that
> >>> > I can connect and fetch mail for the user. (Ultimately, I don't
> >>> > want
> >>> > users to have to know what the IMAP/POP3 server name / port is
> >>> > ....
> >>> > I
> >>> > would like to auto-detect all of that).
>
> >>> > At first I thought I could use "getmxrr" but quickly realized
> >>> > that
> >>> > is
> >>> > only good for determining the SMTP server.
>
> >>> > If anyone has ever "add account" in Gmail Preferences, it's
> >>> > essentially the exact same functionality where Gmail
> >>> > auto-detects
> >>> > the
> >>> > IMAP/POP3 server.
>
> >>> > Any help will be greatly appreciated.
>
> >>> Just try to connect to the server.
> >>> POP3 and IMAP use different port numbers, so if either one does
> >>> not
> >>> work you try the other.
>
> >>> Richard.
>
> >> Richard
>
> >> Thanks for the reply. I guess my question is, how do I figure out
> >> the
> >> server imap/pop3 with only knowing the persons email address?
>
> > The mailserver should be in DNS, not?
>
> > R.
>
> Oh... oops. I understand now. :S
> I think most would try to guess. As far as I know there is not a
> standard for that.
>
> Richard
Yeah, I'm stumped as well.
I know Google has figured out how to auto detect the imap/pop3 since
when you go into the GMail -> Preference -> "Add Account" (so that
Gmail can pull mail from another non-Gmail server) it auto detects the
imap/pop3 server using only a person email address information.
Hmm ... anyone else have any ideas?
Thanks in advance
Re: How to auto detect a remote IMAP/POP3 server given only an email address ?
am 29.12.2007 00:26:10 von Courtney
mp- wrote:
> On Dec 28, 5:04 pm, "Richard" wrote:
>> "Richard" wrote in message
>>
>> news:47757f53$0$22336$dbd4f001@news.euronet.nl...
>>
>>
>>
>>
>>
>>> "mp-" wrote in message
>>> news:b56243f0-6f0e-40d4-9793-87fb440282d7@e23g2000prf.google groups.com...
>>>> On Dec 28, 11:54 am, "Richard" wrote:
>>>>> "mp-" wrote in message
>>>>> news:b4eb9c5a-427c-4b93-90a0-b0a97d335a06@x29g2000prg.google groups.com...
>>>>>> I want to be able to allow people to check their email from my
>>>>>> PHP
>>>>>> online application.
>>>>>> Given only the users 1) email address, 2) username (if
>>>>>> applicable)
>>>>>> and
>>>>>> 3) password - how can I auto detect a remote IMAP/POP3 server so
>>>>>> that
>>>>>> I can connect and fetch mail for the user. (Ultimately, I don't
>>>>>> want
>>>>>> users to have to know what the IMAP/POP3 server name / port is
>>>>>> ....
>>>>>> I
>>>>>> would like to auto-detect all of that).
>>>>>> At first I thought I could use "getmxrr" but quickly realized
>>>>>> that
>>>>>> is
>>>>>> only good for determining the SMTP server.
>>>>>> If anyone has ever "add account" in Gmail Preferences, it's
>>>>>> essentially the exact same functionality where Gmail
>>>>>> auto-detects
>>>>>> the
>>>>>> IMAP/POP3 server.
>>>>>> Any help will be greatly appreciated.
>>>>> Just try to connect to the server.
>>>>> POP3 and IMAP use different port numbers, so if either one does
>>>>> not
>>>>> work you try the other.
>>>>> Richard.
>>>> Richard
>>>> Thanks for the reply. I guess my question is, how do I figure out
>>>> the
>>>> server imap/pop3 with only knowing the persons email address?
>>> The mailserver should be in DNS, not?
>>> R.
>> Oh... oops. I understand now. :S
>> I think most would try to guess. As far as I know there is not a
>> standard for that.
>>
>> Richard
>
>
> Yeah, I'm stumped as well.
>
> I know Google has figured out how to auto detect the imap/pop3 since
> when you go into the GMail -> Preference -> "Add Account" (so that
> Gmail can pull mail from another non-Gmail server) it auto detects the
> imap/pop3 server using only a person email address information.
>
take the domain part of their address and try looking for MX, then A
records..and hope their ISP doesn't have a relay in the way..
> Hmm ... anyone else have any ideas?
>
> Thanks in advance
>
Re: How to auto detect a remote IMAP/POP3 server given only an email address ?
am 29.12.2007 00:56:29 von ivansanchez-alg
The Natural Philosopher wrote:
> take the domain part of their address and try looking for MX, then A
> records..and hope their ISP doesn't have a relay in the way..
.... And do a port scan on pop3.domain, and imap.domain, and do keep a
whitelist of known domains and servers (together with a manual way of
adding a domain+server to that whitelist).
--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Why was God able to create the universe in only seven days? Because he
didn't have an installed base to deal with.
Re: How to auto detect a remote IMAP/POP3 server given only an email
am 29.12.2007 01:53:11 von michealp
On Dec 28, 5:56 pm, Iv=E1n S=E1nchez Ortega
escomposlinux.-.punto.-.org> wrote:
> The Natural Philosopher wrote:
> > take the domain part of their address and try looking for MX, then A
> > records..and hope their ISP doesn't have a relay in the way..
>
> ... And do a port scan on pop3.domain, and imap.domain, and do keep a
> whitelist of known domains and servers (together with a manual way of
> adding a domain+server to that whitelist).
>
> --
> ----------------------------------
> Iv=E1n S=E1nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>
> Why was God able to create the universe in only seven days? Because he
> didn't have an installed base to deal with.
Doing a port scan on imap.domain.com, pop.domain.com, etc.. just seems
like taking an educated guess as to what the IMAP/POP3 server name
is.
Does a DNS record exist describing the hostname for a particular
domains IMAP/POP3 servers? It seems that the MX record is only for
SMTP - which doesn't necessarily mean IMAP/POP3 is on that same
machine.
Re: How to auto detect a remote IMAP/POP3 server given only an email address ?
am 29.12.2007 04:24:27 von Jerry Stuckle
mp- wrote:
> On Dec 28, 5:56 pm, Iván Sánchez Ortega
> escomposlinux.-.punto.-.org> wrote:
>> The Natural Philosopher wrote:
>>> take the domain part of their address and try looking for MX, then A
>>> records..and hope their ISP doesn't have a relay in the way..
>> ... And do a port scan on pop3.domain, and imap.domain, and do keep a
>> whitelist of known domains and servers (together with a manual way of
>> adding a domain+server to that whitelist).
>>
>> --
>> ----------------------------------
>> Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>>
>> Why was God able to create the universe in only seven days? Because he
>> didn't have an installed base to deal with.
>
>
>
> Doing a port scan on imap.domain.com, pop.domain.com, etc.. just seems
> like taking an educated guess as to what the IMAP/POP3 server name
> is.
>
> Does a DNS record exist describing the hostname for a particular
> domains IMAP/POP3 servers? It seems that the MX record is only for
> SMTP - which doesn't necessarily mean IMAP/POP3 is on that same
> machine.
>
No DNS record for IMAP/POP3 because it isn't used for mail transfer.
SMTP needs it so that one system can send to another system. But with
IMAP/POP3 the user is requesting mail. Entirely different process which
doesn't require special DNS records.
As others have said - try the MX record for the domain. If that doesn't
exist, try the A record. If that doesn't work, you're SOL.
And it will fail on a large number of systems. Many large ISP's and
some large hosting companies use different IMAP/POP3 servers to keep the
load down on a single server, for instance. And many large companies do
similar, also.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: How to auto detect a remote IMAP/POP3 server given only an email address ?
am 29.12.2007 10:33:11 von Courtney
mp- wrote:
> On Dec 28, 5:56 pm, Iv�n S�nchez Ortega
> escomposlinux.-.punto.-.org> wrote:
>> The Natural Philosopher wrote:
>>> take the domain part of their address and try looking for MX, then A
>>> records..and hope their ISP doesn't have a relay in the way..
>> ... And do a port scan on pop3.domain, and imap.domain, and do keep a
>> whitelist of known domains and servers (together with a manual way of
>> adding a domain+server to that whitelist).
>>
>> --
>> ----------------------------------
>> Iv�n S�nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>>
>> Why was God able to create the universe in only seven days? Because he
>> didn't have an installed base to deal with.
>
>
>
> Doing a port scan on imap.domain.com, pop.domain.com, etc.. just seems
> like taking an educated guess as to what the IMAP/POP3 server name
> is.
>
> Does a DNS record exist describing the hostname for a particular
> domains IMAP/POP3 servers? It seems that the MX record is only for
> SMTP - which doesn't necessarily mean IMAP/POP3 is on that same
> machine.
MX is the target for publically recievable mail. It may, or may not be,
on the same machine.
For small domains it usually is.
Re: How to auto detect a remote IMAP/POP3 server given only an email
am 30.12.2007 22:04:42 von colin.mckinnon
On 28 Dec, 17:19, mp- wrote:
> I want to be able to allow people to check their email from my PHP
> online application.
>
> Given only the users 1) email address, 2) username (if applicable) and
> 3) password - how can I auto detect a remote IMAP/POP3 server so that
> I can connect and fetch mail for the user. (Ultimately, I don't want
> users to have to know what the IMAP/POP3 server name / port is .... I
> would like to auto-detect all of that).
>
> At first I thought I could use "getmxrr" but quickly realized that is
> only good for determining the SMTP server.
>
> If anyone has ever "add account" in Gmail Preferences, it's
> essentially the exact same functionality where Gmail auto-detects the
> IMAP/POP3 server.
>
> Any help will be greatly appreciated.
You can't.
You can guess at what the name might be (see Iv=E1n S=E1nchez Ortega's
response).
Even if you know the name, it doesn't necessarily follow that the
service is accessible via the internet - many ISPs will firewall
access to their own IP addresses.
C.