Postfix IMAP/SMTP problem on Roundcube - (Ubuntu 18.04)

Posted March 20, 2020 2.6k views
DigitalOcean Accounts


I installed postfix from this address for my server:

I can send and receive mail with SSH. There is no problem in this part.

Then i installed the Roundcube. All settings look green on Roundcube Webmail Installer and i can see my email address and password, and the field I will enter.

My problem starts here.

I cannot login to this field with my information. (Failed to connect to IMAP server)
I also get an error when I enter this information on Roundcube Webmail Installer (Test SMTP config and Test IMAP config)

I made the settings like this;
Server: localhost
SMTP Port: 25
IMAP Port: 143

Where am I making mistakes. Please help me.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @incegozmuratcan,

The Issues that you couldn’t be experiencing with Roundcube could be a lot. It’s gonna be best if we try and pinpoint it by enabling Roundcube’s debug function. To actually do so, you can add the following two lines in your file

$config['debug_level'] = 4;
$config['imap_debug'] = true;

Additionally, I noticed you were checking the tutorial without Dovecot. Without Dovecot, your Roundcube instance won’t be able to connect to your Postfix service. I’ll recommend checking the following tutorial as well :

It will provide you with a way to configure Dovecotwith your Postfix service which will by my account fix the current experienced issues.


by Lukas Erlacher
This tutorial will tell you how to setup a basic mail server and attempts to teach you a bit about the Postfix MTA (Mail Transfer Agent) in the process.
  • Is there a way to use Roundcube and Postfix together without Dovecot?

    • Hi @fkutev22,

      Unfortunately, it’s not possible. The primary purpose of Dovecot is to act as mail storage server. Mail is delivered to the server using some mail delivery agent like Postfix and stored for later access with an email client - Here is when Roundcube does come in play.

      If I left something out, please do let me know!


      • Excuse me for the second comment, I wanted to confirm something.

        You can use dovecot with other mail services such as Exim for instance. It’s not exclusive to Postfix. The same goes for the email client, you can use other services such as Mail Horde.