Application load balancers do not work with non HTTP/S protocols. For example if you are trying to put a SMTP, POP3 or IMAP server behind an ALB you are out of lock.
As mentioned before for email services, typical port configurations are:
You would need to configure PORTS 25, 465
You would need to configure PORTS 110, 995
You would need to configure PORTS 143, 993
Classic Load Balancer
CLBs allow you to redirect TCP traffic (with SSL enabled) to your nodes. The also allow you to attach SSL certificates to the listening ports.
Setting up a POP3 server
We recommend using izy-pop3
as a pop3 server. This tool can be configured to fetch emails from a variety of data sources.
To get started, run the server in the fake mode:
node cli.js method serverpop3 port 20110 password PsWd mimestore.modhandler fake
This will start the POP3 server that clients can connect, authenticate and get fake emails from.
Settings up the Load Balancer
Before you begin, make sure you have the following information handy:
- The VPC that the instance is launched into and its CIDR (supernet): The ELB needs to be put on same VPC as the instance.
- Update the security group for the instance to allow for incoming traffic on TCP:20110
- Create a secutity group in the instance VPC that would allow incoming TCP:110, TCPS:995
- The Availability Zone that the host is inside of (us-west-2b)
- Health Check end-point on the instance (i.e. http://:7001/elbhealthcheck.html)
- SSL certificate that will be used for TCPS:995.
The notes above assume the following configuration for the POP3 server:
ELB (TCP:110) => Instance (TCP:20110)
ELB (TCPS:995) => Instance (TCP:20110)
Go ahead and follow these steps:
- Create a Classic Load Balancer
- Make sure the LB has the correct security groups and is on the VPC
First you should test the non secure setup at TCP:110:
node cli.js method clientpop3 ip pop3.yourdomain.com port 110 user user@domain pass 'password' verbose.clientLog cmd list
Then, for the secure connection:
node cli.js method clientpop3 ip pop3.yourdomain.com port 995 user user@domain pass 'password' tls true verbose.clientLog cmd list