Here’s a list of the must used TCP & UDP IP ports that you could possibly need to use (or open in your firewall(s)).
TCP port 25 – SMTP
TCP port 26 – SSL secured SMTP
TCP port 110 – Post Office Protocol (POP3)
TCP port 995 – SSL secured POP3
TCP port 143 – Internet Message Access Protocol v. 4 (IMAP4)
TCP port 993 – SSL secured IMAP4
TCP port 80 – HTTP for Outlook Web Access
TCP port 443 – SSL secured HTTP for Outlook Web Access (HTTPS)
TCP/UDP port 389 – Lightweight Directory Access Protocol (LDAP)
TCP port 3268 – LDAP communications with an Active Directory Global Catalog Server
TCP port 119 – Network News Transfer Protocol (NNTP)
TCP port 563 – SSL secured NNTP
TCP port 135 – Remote Procedure Protocol (RPC) however it will also use ports 1024 and up as needed.
TCP/UDP port 53 – Domain Name System (DNS)
TCP port 102 – Mail Transfer Agent (MTA) *Only used in X.400 connections.
TCP/UDP port 88 – Kerberos