Test POP, SMTP, IMAP Logins directly
Rarely, it may be useful to test the ability to login to email accounts directly so you can rule out third party applications (like Apple Mail, Windows Mail, Thunderbird, etc) as being a potential problem.
Note: In almost every case you should be able to figure out the issue before arriving at this stage. Basically, if you're reading this documentation without having been sent here intentionally by a higher-tier tech, then you probably won't benefit from doing this.
Secure vs Non-Secure connections
In either case, you will connect via your system's command prompt (Terminal, Powershell, etc). The command you use (telnet or openssl) is dependent on whether you are trying to connect to a secure server (SSL) or an insecure server (non-SSL). You should always prefer using a secure connection.
Secure connections that require
openssl:- IMAP: 993
- SMTP: 465 (or 587 for STARTTLS)
- POP: 995
Insecure connections that require
telnet:- IMAP: 143
- SMTP: 25
- POP: 110
Before you begin, make sure your system has the required command. Open a command prompt and simply type the command name (openssl or telnet) to see if those commands are available. Your system will tell you that they're not available or you will simply get some kind of output from the command, meaning it's available.
For Windows, you may need to enable Telnet through "Additional Windows features" first. Alternatively, you can install Windows Subsystem for Linux (WSL) from the App Store - something like Ubuntu. Once done, you would run a command prompt, run bash, and then be able to run the telnet command.
Connection string for openssl
Port 993, 995, 465 (SSL) - most common
To connect to a secure server using openssl type openssl s_client -connect example.com:### where example.com is the mail server in question (like imap.suddenlink.net) and ### is the secure port number. On success you'll get a lot of text scrolling by which deals with the security certificate and handshake, then you'll be left with a blinking cursor.
Port 587 (STARTTLS)
Sometimes a mail server isn't configured to work with port 465 and you have to connect with port 587 instead. The command is openssl s_client -connect example.com:### -crlf -quiet -starttls smtp.
Connection string for telnet
To connect to an insecure server using telnet, type telnet example.com ### where example.com is the mail server in question (like imap.suddenlink.net) and ### is the insecure port number. On success, you'll get a few lines of text and then a blinking cursor.
SMTP
SMTP Authentication requires you to first base64 encode the username and password. This is easily achievable on Linux and Mac via:
perl -MMIME::Base64 -e 'print encode_base64("username");'
perl -MMIME::Base64 -e 'print encode_base64("password");'
Follow the instructions above to connect, then:
EHLO example.com, replacingexample.comwith the SMTP server address- You'll get some text in response. Once text stops arriving, type
AUTH LOGIN - The server will respond with
334 VXNlcm5hbWU6;. Type the base64 encoded username, by itself, and hit Enter. - The server will respond with
334 UGFzc3dvcmQ6;. Type the base64 encoded password, by itself, and hit Enter. - On success, you will be shown
235 Authentication succeeded
IMAP
Follow the instructions above to connect, then:
1 login username passwordwhereusernameandpasswordare the customer's username and password- On success, you will get a message that begins with
1 OK
POP
Follow the instructions above to connect, then:
user usernamewhereusernameis the customer's usernamepass passwordwherepasswordis the customer's password- On success, you will get a message
+OK Logged in.