Introduction

Dovecot is a mail delivery agent that provides IMAP and POP3 services for email clients. Verifying that Dovecot is running correctly is an important step when troubleshooting email access issues. This guide explains how to confirm that Dovecot is listening on the required ports, accepting user authentication, allowing remote connections, and accessing user mailboxes successfully.


Prerequisites

  • Root or sudo access to the server
  • Postfix and Dovecot are installed and running
  • Access to the server through SSH
  • Valid email account credentials for testing

Implementation

Step 1: Verify That Dovecot Is Listening

Run the following command to check whether Dovecot is listening on the required ports:

netstat -aunt

Verify that Dovecot is listening on:

  • Port 143 (IMAP)
  • Port 110 (POP3)

Step 2: Test the IMAP Service Locally

Connect to the IMAP service using Telnet:

telnet localhost 143

Expected output:

Trying 127.0.0.1…

Connected to localhost.

Escape character is ‘^]’.

  • OK dovecot ready.

This confirms that the Dovecot service is running correctly.


Step 3: Verify User Authentication

After connecting through Telnet, test user authentication.

Example:

1 login username password

If the login is successful, you should receive:

1 OK Logged in.

This confirms that Dovecot is accepting user credentials.


Step 4: Verify Remote Login

From a remote system, connect to the server using its IP address:

telnet server_ip_address 143

Example:

telnet 21.14.126.132 143

Expected output:

Trying 21.14.126.132…

Connected to server.

Escape character is ‘^]’.

  • OK dovecot ready.

Authenticate using a valid email account:

1 login username password

Successful authentication returns:

1 OK Logged in.

This confirms that remote IMAP connections are working correctly.


Step 5: Verify Mailbox Access

After logging in successfully, select the user’s inbox:

1 select inbox

A successful response will display mailbox information similar to:

  • FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
  • OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft *)] Flags permitted.
  • 0 EXISTS
  • 0 RECENT
  • OK [UIDVALIDITY 1163363765] UIDs valid
  • OK [UIDNEXT 1] Predicted next UID

1 OK [READ-WRITE] Select completed.

This confirms that Dovecot can locate and access the user’s mailbox successfully.


Conclusion

By verifying that Dovecot is listening on the required ports, accepting user authentication, allowing remote connections, and providing mailbox access, you can confirm that the Dovecot service is functioning correctly with Postfix. These checks are useful when diagnosing email login, IMAP, and POP3 connectivity issues.

Leave a Reply