Email Tutorials - Herong's Tutorial Examples - v1.03, by Herong Yang
Test Dovecot POP3 Server with "telnet" Client
This section provides a tutorial example on how to test Dovecot POP3 server with the 'telnet' client command to send a POP3 request to port 110 on local host. Users can retrieve emails after authenticated with their passwords.
One way to test the Dovecot server is to use the "telnet" client command. All we need is the IP address of the server and the POP3 port number, which is defaulted to 110. Here is how I did it.
1. Run the following "telnet" session on my CentOS computer where Dovecot server is running.
herong$ telnet localhost 110 Trying ::1... Connected to localhost. Escape character is '^]'. +OK Dovecot ready. USER herong +OK PASS TopSecret +OK Logged in. STAT +OK 2 708 LIST +OK 2 messages: 1 416 2 292 . RETR 1 +OK 416 octets Return-Path: <herong@example.com> X-Original-To: herong Delivered-To: herong@example.com Received: from localhost (localhost [IPv6:::1]) by mail.herongyang.com (Postfix) with ESMTP id 5EABD266002B for <herong>; 15 Nov 2023 06:19:34 -0500 (EST) Message-Id: <20231113111946.5EABD266002B@mail.herongyang.com> Date: 15 Nov 2023 06:19:34 -0500 (EST) From: herong@example.com Hello world! . QUIT +OK Logging out. Connection closed by foreign host.
3. Open firewall to handle remote POP3 requests on port 110.
herong$ sudo firewall-cmd --zone=public --add-service=pop3 herong$ sudo firewall-cmd --runtime-to-permanent
4. Run the following "telnet" session on my macOS computer which is connected to the CentOS computer. The output shows that the Dovecot POP3 server is configured to require SSL/TLS connections from remote computers.
herong$ telnet 192.168.1.100 110 Trying 192.168.1.100... Connected to 192.168.1.100 Escape character is '^]'. +OK Dovecot ready. USER herong -ERR [AUTH] Plaintext authentication disallowed on non-secure (SSL/TLS) connections. QUIT +OK Logging out. Connection closed by foreign host.
Ok. Dovecot POP3 server works for local clients and requires SSL/TLS connections for remote clients. See next chapter on how to test SSL/TLS connections with "openssl s_client" commands.
By the way using plain (clear text) user name and password in remote connection is extremely bad, since anyone on the network can catch the communication data packet and see your password.
Table of Contents
Postfix - Mail Transport Agent (MTA)
SSL/TLS Secure Connections with Postfix Server
►Dovecot - IMAP and POP3 Server
Install and Configure Dovecot on CentOS
Test Dovecot IMAP Server with "telnet" Client
►Test Dovecot POP3 Server with "telnet" Client
Keep Deleted Emails on Dovecot
Turn on Dovecot Server Logging for Troubleshooting
"doveadm" Command - Dovecot's Administration Utility
SSL/TLS Secure Connections with Dovecot Server
Email Client Tools - Mail User Agents (MUA)