473,700 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to auto detect a remote IMAP/POP3 server given only an emailaddress ?

mp-
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.

Dec 28 '07 #1
11 10740

"mp-" <mi******@gmail .comwrote in message
news:b4******** *************** ***********@x29 g2000prg.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.
Dec 28 '07 #2
mp-
On Dec 28, 11:54 am, "Richard" <root@localhost wrote:
"mp-" <miche...@gmail .comwrote in message

news:b4******** *************** ***********@x29 g2000prg.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?

Dec 28 '07 #3

"mp-" <mi******@gmail .comwrote in message
news:b5******** *************** ***********@e23 g2000prf.google groups.com...
On Dec 28, 11:54 am, "Richard" <root@localhost wrote:
>"mp-" <miche...@gmail .comwrote in message

news:b4******* *************** ************@x2 9g2000prg.googl egroups.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.
Dec 28 '07 #4

"Richard" <root@localhost wrote in message
news:47******** *************** @news.euronet.n l...
>
"mp-" <mi******@gmail .comwrote in message
news:b5******** *************** ***********@e23 g2000prf.google groups.com...
>On Dec 28, 11:54 am, "Richard" <root@localhost wrote:
>>"mp-" <miche...@gmail .comwrote in message

news:b4****** *************** *************@x 29g2000prg.goog legroups.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
Dec 28 '07 #5
mp-
On Dec 28, 5:04 pm, "Richard" <root@localhost wrote:
"Richard" <root@localhost wrote in message

news:47******** *************** @news.euronet.n l...


"mp-" <miche...@gmail .comwrote in message
news:b5******** *************** ***********@e23 g2000prf.google groups.com...
On Dec 28, 11:54 am, "Richard" <root@localhost wrote:
"mp-" <miche...@gmail .comwrote in message
>>news:b4****** *************** *************@x 29g2000prg.goog legroups.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

Dec 28 '07 #6
mp- wrote:
On Dec 28, 5:04 pm, "Richard" <root@localhost wrote:
>"Richard" <root@localhost wrote in message

news:47******* *************** *@news.euronet. nl...


>>"mp-" <miche...@gmail .comwrote in message
news:b5****** *************** *************@e 23g2000prf.goog legroups.com...
On Dec 28, 11:54 am, "Richard" <root@localhost wrote:
"mp-" <miche...@gmail .comwrote in message
news:b4**** *************** *************** @x29g2000prg.go oglegroups.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
>essentiall y 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
Dec 28 '07 #7
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.
Dec 29 '07 #8
mp-
On Dec 28, 5:56 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.orgwrote:
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.
Dec 29 '07 #9
mp- wrote:
On Dec 28, 5:56 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.orgwrote:
>The Natural Philosopher wrote:
>>take the domain part of their address and try looking for MX, then A
records..an d 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.
js*******@attgl obal.net
=============== ===

Dec 29 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1930
by: Alexander Schumann | last post by:
Hello everyone, We are building a new web based e-mail client "Fiezel" that will support IMAP, POP3 and SMTP protocols. Will be written in php4. I am trying to collect all the infomation on SNMP I can get and any other protocols like POP3 infomation for desinging and developing for php4. I have also collected the infomation wish I will try to support: RFC2821: Simple Mail Transfer Protocol (SMTP) RFC2822: Standard for ARPA internet...
5
4619
by: F. GEIGER | last post by:
Hi all! As I saw Alex Martelli's post about a mbox cleaner based on POP3, I thought, it could be possible to do that based on IMAP too. That way I could ask the server for mails having attached EXE files and delete all those mails on the server. This would save me a lot of traffic over my phone line connection. But I'm missing one important thing: How do I get the server to tell me about attachments.
1
2319
by: !TG | last post by:
I'm looking for something that should be simple. What I want to do it just connect to an IMAP or POP server and see how many unread messages there are and display that number. Does anyone know how to do this?
3
2182
by: chirag | last post by:
i want a IMAP server for windows so that i can retrive incoming mails. I use mssql server to store user information. i need IMAP server to develop project i.e mail system can any body sent me IMAP server.
2
2832
by: Mike Brearley | last post by:
I need to write a script that will check a catch-all mailbox (pop3) and send a non delivery report back to the sender of the email. Background info: I have a domain hosted on a site that offers unlimited email accounts... the problem is, emails sent to an invalid address on the domain aren't automatically returned as non-deliverable. I am, however, able to set up a catch-all address and able to pick up those emails. Id like to set up a...
3
1825
by: Richard Thornley | last post by:
Hello, I was just been given a project and I have some questions on how to accomplish the first part of the task. If a user sends an email to a specific email address I need to detect that
1
1610
by: Trevor | last post by:
In the PHP manual (http://us3.php.net/imap) it reads: >LIX. IMAP, POP3 and NNTP Functions >Introduction > >These functions are not limited to the IMAP protocol, despite their name. The underlying >c-client library also supports NNTP, POP3 and local mailbox access methods. Can someone tell me where to go to find out how these functions work in relation to POP3?
0
1479
by: Christian Hofmann | last post by:
Hello, I am looking for a smtp/imap/pop3-component to build an own mailserver. I searched all the web but the onliest I found were complete mailservers or components to fetch mails via pop3/imap or deliver mails via smtp. Where can I find such components/classes for dotnet. I want to build a windows mailserver that stores all the mails and data in my postgresql-database. I found no mailserver that could do that. Maybe if
1
2920
by: CodeSeeker | last post by:
I have an application, which uses pop3 to read the messages from the mailbox, and it has been working fine for so many year. We recently have started changing this application to use java mail IMAP 4 instead of Pop3. Primary reason for that :- Is we want to better meet out SLA, so we have decided to go with the 2 instances of this application, and hence decided to use IMAP4 to concurrently accessing the mailboxes via IMAP4. My issues:- Now...
0
8716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9204
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6557
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4650
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2380
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2021
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.