Cpanel IMAP error under FreeBSD

This error has been observed mostly on BSD servers even on brand new installs .

It is even that the IMAP server under Courier is not starting at all or the Authentication daemon is throwing out errors.

One of the errors can be seen when trying to access Squirrelmail or Horde, it is even you can not login or get an error like:

Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:143 (Connection refused) in /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth/functions.php on line 129

If you use the Current version of Cpanel you may want to check firstly if IMAP is actually set to Start or not.
You can check this under WHM >> Service Configuration >> IMAP Coonfiguration .
Under cPanel 11.24.x it is now called Mailserver Configuration .

If this is set to On and you still have issues then try and check the /etc/rc.conf file(FreeBSD) .

Regarding IMAP and the authentication daemon you should see the following lines in there:


If you do not see any of this lines or any of them is looking different edit /etc/rc.conf and edit the line to look like the ones i’ve posted.