-1

Can we use ports other than 993 for IMAP in Microsoft hosted exchange servers?

Are these ports fixed from the Microsoft side OR any organization can configure its own port?

Please share the list of ports which can be used.

Stephane
  • 6,382
  • 3
  • 25
  • 47
Elena
  • 1
  • 2

1 Answers1

0

First a bit of background:

TCP/UDP port numbers

In TCP (and UDP), the port number used by a server to receive connection is limited to the range 1-65535. (This wikipedia article lists all current ports numbers)

What port is used by an application usually depends on what protocol is used: common protocols have default port numbers assigned to them (known as "well known port"). These well-known ports are all in the range 1-1023 (and, in *nix OS, only root can bind to these port numbers).

The ranges between 1024 and 49151 is the "registered port range", used by applications for their own use: any organisation can register one of these port qas being used by ttheir application for a specific purpose.

Ports between 49152 and 65535 are in the dynamic port range and typically used to bind the client side of the socket connection.

Now, if an application exposes an IMAP4 protocol interface, it will use TCP port 143 by default and if is uses the secure version of the same protocol (IMAPS), it will use TCP port 993 by default.

These are, however, default values: the port number that a client will use to contact a server using the specific protocol by default. If you change that port number, then you will have to configure all your clients to use that new, non-default port and you must clearly indicate that change in the documentation.

In addition to that, you will also need to make sure no other application on the same IP address uses that same port: you can't have both HTTP and IMAP running on the same port on the same IP address. It's also strongly discouraged to use a well-known port for any other protocol than the one it is listed for.

Specific answers

Now, all the being said, here are the answers to your questions:

  • You can use other ports than 993 for IMAPS but you will then have to update all your clients to use that port manually. How to change the port number used by the IMAP connectors in exchange depends on the exchange version.
  • These port numbers assigned to common protocols and registered to 3rd parties are managed by the IANA (Internet Assigned Numbers Authority).
  • You can get a full list of the registered ports from IANA or from the corresponding wikipedia article.
Stephane
  • 6,382
  • 3
  • 25
  • 47
  • Does office 365 provide any such mechanism to manually configure the imap port? – Elena Sep 04 '13 at 09:41
  • As far as I can tell, no, you can't configure the inbound connectors on office 365 – Stephane Sep 04 '13 at 09:48
  • Thank You for your answer. I am making an application in which I want configurable ports for IMAP to connect to hosted Exchange Server. So which ports should I prefer? – Elena Sep 04 '13 at 10:12
  • You should prefer the standard IANA ports, but include the option to configure others. – Trondh Sep 04 '13 at 10:44
  • Remember: IMAP4 uses port 143. Port 993 is IMAPS (IMPA4 over SSL/TLS) so you'll need to implement SSL if you want to talk to exchange via IMAPS on that port. – Stephane Sep 04 '13 at 12:13