Dovecot: Failed to connect to localhost:143

Hi all,
I’ve read several threads without being at the head.
When I access to webmail ( I will return this error:
An error occurred listing mail in this folder : Failed to connect to localhost:143 : Connection refused
Dovecot is active.
Before upgrading Usermin and Virtualmin worked perfectly.
I think it’s the fault of packages ssl.

What do you advise me to do?

Thanks all,


What output does this command produce:

netstat -an | grep :143

no output…


Okay, that means that Dovecot isn’t listening on the IMAP port.

Does it help to restart Dovecot?

You can do that by running this command:

/etc/init.d/dovecot restart


root@host:~# /etc/init.d/dovecot restart
Restarting IMAP/POP3 mail server: dovecot.

And the problem doesn’t change…

It sounds like Dovecot may have been configured to stop listening for connections on port 143.

What is the output of “dovecot -n”?


Hi Eric,

This is output:

2.1.7: /etc/dovecot/dovecot.conf

OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0

protocols = " pop3"
ssl = no
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv


Looks like you need to go to webmin dovecot and configure Networking and Protocols to include IMAP

Is there any guide that explains how to configure it?


You can do that by logging into Virtualmin, and click Webmin -> Servers -> Dovecot -> Networking and Protocols, and in that screen, make sure IMAP is included in the list of “Serve mail protocols”.


Hi Eric,
I’ve actived IMAP, but now it’s give me this error:

Can’t use an undefined value as a symbol reference at /usr/share/usermin/mailbox/ line 1988.

Can any one help me?
I 've enable IMAP, but when i try to login in :2000 appears this error:

Error - Perl execution failed

Can’t use an undefined value as a symbol reference at /usr/share/usermin/mailbox/ line 1988.

There may be a problem with the Usermin metadata.

You may want to go into that user’s home directory, and rename the .usermin directory to something else… perhaps .usermin.old or so. That’ll get re-created next time the user logs in, and that should resolve the issue.


I renamed it and I added a new user, but it’s gives the same error and didn’t create a new folder “.usermin”.

Just to clarify – did you rename the .usermin folder for this particular user?

That is, you wouldn’t want to rename /home/DOMAIN/.usermin, if you’re logging in as “user.domain”.

If you’re using “user.domain” to log in, the home directory for that user is in /home/DOMAIN/homes/user. And in there, you’d see a .usermin directory.


Ok sorry, I misunderstood.

I’ve renamed the correctly folder now:

There is nothing to do, It’ always make the same mistake

So I can correlate this line number with our code - what version of Usermin are you running there?

The command dpkg --list usermin will tell you.

ii usermin 1.550 all web-based user account administra

It looks like the IMAP login is failing in some odd way.

What gets logged to /var/log/mail.log when you try to access Usermin?

Jun 2 02:31:04 host dovecot: auth: Fatal: No passdbs specified in configuration file. PLAIN mechanism needs one

Jun 2 02:31:04 host dovecot: master: Error: service(auth): command startup failed, throttling for 60 secs

Jun 2 02:31:04 host dovecot: imap-login: Disconnected: Auth process broken (disconnected before greeting, waited 0 secs): user=<>, rip=, lip=, secured, session=<EWSh9iDe1gB/AAAB>