Customer want to access Gmail using IMAP in an Explicit Proxy deployment using Microsoft Outlook.
Gmail IMAP configuration for Explicit Proxy for Microsoft Outlook.
Microsoft Outlook normally do not respect the Proxy setting given in browser for IMAP configuration. It will try to go directly via gateway and in most of the secure customer environment, this is not allowed. The below article will provide the steps to follow for making the Gmail IMAP access working through explicit proxy.
1. Creating Proxy Services to listen on port 993, 465 and 587
Navigate to Configuration > Services > Proxy Services and create a new service under any of the “Predefined Service Groups”. The new service should use “TCP Tunnel” as Proxy. Now add 3 explicit listeners for TCP port 993, 465 and 857 as given in the below figure.
The final setting should look like below.
2. Now navigate to Configuration > Forwarding > Forwarding Hosts and create 3 forwarding hosts.
3. Now create a “Forwarding Layer” and create 3 rules with below details
Source: ANY [or as per the requirement]
Destination: Server port 993
Service: TCP Tunnel
Action: Forward host created for imap.gmail.com
Source: ANY [or as per the requirement]
Destination: Server port 465
Service: TCP Tunnel
Action: Forward host created for smtp.gmail.com (which is created for TCP port 465)
Source: ANY [or as per the requirement]
Destination: Server port 587
Service: TCP Tunnel
Action: Forward host created for smtp.gmail.com (which is created for TCP port 587)
The CPL for the above rules for advanced users is below
<Forward>
server_url.port=993 tunneled=yes forward("GmailIMAP") forward.fail_open(no)
server_url.port=465 tunneled=yes forward("GmailSMTP-465") forward.fail_open(no)
server_url.port=587 tunneled=yes forward("GmailSMTP-587") forward.fail_open(no)
4. Now open outlook and add a new email account. Navigate till the manual settings of the server are asked. Please configure as given below
5. Click on “More Settings” and select “Outgoing Server” tab. Provide the information as below
6. Click on “Advanced” tab and fill in as below
Note: The “Outgoing server (SMTP):” port might need to be changed to “465” if “587” is not letting you through.
7. Click “OK” and and click “Test Account Settings …” to test the configuration.
Assumption:
1. TCP port 993, 465 and 587 is open on the firewall for proxy IP address.
2. Clients can reach proxy on above mentioned ports
3. Allow rules are made for above communication
4. Bypass authentication is set for the above rules