Error connecting to IMAP server: localhost. 111 : Connection refused


i met a problems of the squirrel mail installed on a centos 6.5 32bit version,

its installation successful.and noted as below
“SquirrelMail 1.4.22 (Stable)
Installation directory /home/teddybirds/public_html/squirrelmail
Uses database MySQL database teddybirds”

created an id with the edit user function of virtualmin,and added both the database etc,and try login with the webmail, then it feedback below errors:

“Error connecting to IMAP server: localhost.
111 : Connection refused”

does any friend know how to fix it?



Hmm, is Dovecot running? You can verify that with this command:

/etc/init.d/dovecot restart

If that doesn’t help – the error mentions “111”, which might be referring to the port it’s trying to connect to… that’s not the correct IMAP port though, do you know if the default port was changed?


thank you Erik

i tried reinstalled virtualmin and opened domain email, etc.

and seems now can send an email with the account added,and can login into squirrel mail installed correctly,

but problems is can not receive an email~

so what problems with this,should i open other functions and plugins?


This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: ------ This is a copy of the message, including all the headers. ------ Return-path: Received: from localhost ([::1] helo=[]) by with esmtpa (Exim 4.76) (envelope-from ) id 1WzFXb-0004K5-Nz for; Mon, 23 Jun 2014 18:28:56 -0700 Received: from (SquirrelMail authenticated user webmaster@***.net) by with HTTP; Tue, 24 Jun 2014 01:28:55 -0000 Message-ID: <16cf5e4a1fe0841eb73267c2ee694fb4.squirrel@> In-Reply-To: <> References: <> Date: Tue, 24 Jun 2014 01:28:55 -0000 Subject: Re: test etc From: "Dark" To: Reply-To: webmaster@***.net User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal


Email should work by default, you shouldn’t need to enable any features or plugins.

When you sent that email, was that from an external system? Or were you sending an email from your own server, to another user on your server?


thank you Erik~

i use send the email with the squirrel mail, the own server, to some other email address not on my server,then sending success.

when i use another email address not on my server, send a email to the email address at my server, then it do not come and can not receive the incoming email. and also i find problems when visiting the newly setup site: showed “Forbidden You don’t have permission to access / on this server.”

not sure what problems,i am new to virtualmin, and the virtualmin i used is a one click pack in chinese version:
wget;sh ./;

thank you!


The “Forbidden” error you’re receiving with your website may mean that you just need to upload a website into the public_html directory for that domain.

When trying to send an email to your server from a remote server, do you see any errors or related messages in the /var/log/maillog file?