• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Webmail Error: Error connecting to IMAP server.

D

devindull

Guest
We installed HotFix9 for Plesk 7.5 and now Horde won't work, and it was designed to fix Horde! Using the FreeBSD 4.9 patch, we now cannot login to webmail:

The webmail login returns this after logging in:
Error connecting to IMAP server. 60 : Operation timed out

From Logfile:
Apr 27 23:37:41 HORDE [error] [imp] Error connecting to IMAP server. 60 : Operation timed out. [on line 473 of "/usr/local/psa/psa-horde/imp/lib/IMAP/Client.php"]
 
Originally posted by devindull
We installed HotFix9 for Plesk 7.5 and now Horde won't work, and it was designed to fix Horde! Using the FreeBSD 4.9 patch, we now cannot login to webmail:

The webmail login returns this after logging in:
Error connecting to IMAP server. 60 : Operation timed out

From Logfile:
Apr 27 23:37:41 HORDE [error] [imp] Error connecting to IMAP server. 60 : Operation timed out. [on line 473 of "/usr/local/psa/psa-horde/imp/lib/IMAP/Client.php"]

I had exactly the same problem. The problem is that the imap server seems to lock up.

If you restart the server, the problem goes away - but only to come back again mysteriously later.

This hotfix was not so hot...
 
Also, you can simply restart the IMAP service in the control panel, and then one can login.

However, like I said, the imap server tends to lock up after about 3 hours. Then you have to restart the service. There is something wrong....
 
Yeah, well the restarting IMAP option isn't working for me. I've restarted it in the control panel, in the shell prompt, and plesk as a whole. Any other ideas?
 
Originally posted by devindull
Yeah, well the restarting IMAP option isn't working for me. I've restarted it in the control panel, in the shell prompt, and plesk as a whole. Any other ideas?

Hmmm. No idea. I don't use the webmail often enough to notice. I just tried it once when Outlook was getting time-out errors, and when I couldn't log into the webmail interface, I restarted the service and everything went well - for a time, and then the same problem resurfaces. I have to restart the IMAP service about once a day - a PITA.

How many concurrent users do you have ? If there are many, it could be the 'connections per IP' issue....

Sorry couldn't be of more help !
 
There's only five people that use the Webmail out of the 200+ emails on the server. But, the reason they do so is they are always traveling and keeping a POP3 account/software with them is extremely hard.
 
psa_hotfix8_v7.5.4_build75060413.12_os_FreeBSD_4.9_i386.txt

That's the hotfix that caused the entire meltdown.
 
Well, I don't know if I can help you too much.

But what does your imap (maillog) say? Does it register the connections ? Can you try accessing horde at the same time as doing a tail -F on the maillog and see what happens?

I once borked a configuration file that blocked access from 127.0.0.1 and that really made life difficult for me with IMAP and php. Perhaps something similar?

Are IMAP and PHP on the same server? What does the horde config file say ?

( look in the file : /usr/local/psa/etc/psa-horde/imp/config/servers.php, around line number 197 :

197 // get hostname from http URL (patch for Plesk)

)

What kind of info do you see after that ?
 
dingle@its:/usr/home/derek# pico /usr/local/psa/etc/psa-horde/imp/
conf.php filter.txt menu.php motd.php servers.php
conf.xml header.txt mime_drivers.php prefs.php trailer.txt
dingle@its:/usr/home/derek# pico /usr/local/psa/etc/psa-horde/imp/

That servers.php file and the directory you say it should be in doesn't exist.

When tailing the MAILLOG:
Apr 28 20:29:05 its imapd: Connection, ip=[127.0.0.1]
Apr 28 20:29:05 its imapd: IMAP connect from @ [127.0.0.1]INFO: LOGIN, user=comments, ip=[127.0.0.1], protocol=IMAP
Apr 28 20:29:10 its qmail: 1146270550.045958 starting delivery 17861: msg 1071759 to remote [email protected]
Apr 28 20:29:10 its qmail: 1146270550.046554 status: local 0/10 remote 1/20
Apr 28 20:29:10 its qmail: 1146270550.050095 delivery 17861: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
Apr 28 20:29:10 its qmail: 1146270550.050557 status: local 0/10 remote 0/20
Apr 28 20:29:14 its qmail: 1146270554.069580 starting delivery 17862: msg 1068410 to remote [email protected]
Apr 28 20:29:14 its qmail: 1146270554.070161 status: local 0/10 remote 1/20
Apr 28 20:29:14 its qmail: 1146270554.073634 delivery 17862: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
Apr 28 20:29:14 its qmail: 1146270554.074089 status: local 0/10 remote 0/20
Apr 28 20:29:16 its qmail: 1146270556.085750 starting delivery 17863: msg 1073963 to remote [email protected]
Apr 28 20:29:16 its qmail: 1146270556.086342 status: local 0/10 remote 1/20

...view http://inter5.org/maillog-tail.txt to see the whole dump output from maillog.

Yes, php and IMAP are on the same box.

horde.conf (top portion, its the default one, not edited)
$conf['debug_level'] = E_ERROR;
$conf['max_exec_time'] = 0;
$conf['use_ssl'] = 2;
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['server']['port'] = $_SERVER['SERVER_PORT'];
$conf['compress_pages'] = true;
$conf['umask'] = 077;
$conf['session']['name'] = 'Horde3';
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['timeout'] = 0;
$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
$conf['cookie']['path'] = '/';
$conf['sql']['persistent'] = false;
$conf['sql']['hostspec'] = 'localhost';
$conf['sql']['username'] = 'horde';
$conf['sql']['socket'] = '/var/lib/mysql/mysql.sock';
$conf['sql']['protocol'] = 'unix';
$conf['sql']['database'] = 'horde';
 
Originally posted by devindull
dingle@its:/usr/home/derek# pico /usr/local/psa/etc/psa-horde/imp/
conf.php filter.txt menu.php motd.php servers.php
conf.xml header.txt mime_drivers.php prefs.php trailer.txt
dingle@its:/usr/home/derek# pico /usr/local/psa/etc/psa-horde/imp/

That servers.php file and the directory you say it should be in doesn't exist.


Actually, it is there is you look closer... it is in the 'config' directory of imp

...view http://inter5.org/maillog-tail.txt to see the whole dump output from maillog.

You do seem to get a connection, if you look at these lines:
Apr 28 20:29:17 its imapd: IMAP connect from @ [127.0.0.1]INFO: LOGIN, user=comments, ip=[127.0.0.1], protocol=IMAP
Apr 28 20:29:17 its imapd: 1146270557.448798 LOGOUT, user=comments, ip=[127.0.0.1], headers=0, body=0, rcvd=62, sent=321, maildir=/usr/local/psa/qmail/mailnames/areyouracist.com/comments/Maildir

Yes, php and IMAP are on the same box.

horde.conf (top portion, its the default one, not edited)

Actually the servers.php file is more important. It is there, you just need to look again...

[/QUOTE]

horde seems to log out almost immediately as soon as it connects, at least according to the logs. Have you enabled folder subscriptions ?
 
gee. i am blind with the servers.php, lol.

$servers['_prompt'] = array(
'name' => _("Choose a mail server:")
);

// get hostname from http URL (patch for Plesk)
$headers = getallheaders();
$ServerName = preg_replace('/^webmail\./', '', preg_replace('/^www\./', '', $headers['Host']));
$DomainName = ($ServerName != '') ? $ServerName : '@DEFAULT_SERVERNAME@';

$servers['imap'] = array(
'name' => 'IMAP Server',
'server' => 'localhost',
'hordeauth' => false,
'protocol' => 'imap/notls',
'port' => 143,
'maildomain' => $DomainName ,
'smtphost' => 'localhost',
'smtpport' => 25,
'realm' => '',
'preferred' => '',
);

$servers['pop'] = array(
'name' => 'POP3 Server',
'server' => 'localhost',
'hordeauth' => false,
'protocol' => 'pop3',
'port' => 110,
'maildomain' => $DomainName,
'smtphost' => 'localhost',
'smtpport' => 25,
'realm' => '',
'preferred' => '',
);

thanks for the help so far, maybe this paste will show enough to end the problem!!!! :)
 
I just got back, so I didn't see your message till now.

Here is what my servers.php looks like :

$servers['imap'] = array(
'name' => 'IMAP Server',
'server' => 'localhost',
'hordeauth' => false,
'protocol' => 'imap/notls',
'port' => 143,
'folders' => 'INBOX.',
'namespace' => '',
'maildomain' => $DomainName,
'smtphost' => 'localhost',
'smtpport' => 25,
'realm' => '',
'preferred' => '',
'dotfiles' => false,
'hierarchies' => array()
);

The date on my file is 24 August 2005. So you might have a different. version. The only difference is the folders parameter.

In any case, I see nothing wrong with the servers configuration.

Do you have a list of files that were changed by the update?

Sorry not to be of much help... but since the update did the damage, some SWsoft fellow should take a look at your problem. I have plesk 7.5.4

I eventually found the problem on my server however - it was actually a problem from our network, not the server that caused the time-outs on the imap. Our firewall would drop the rules periodically (as I badly configured the cron script), only to reload them a half-hour later. What a headache!

Hope your problem is something easy to fix !
 
yeppers. they looked at it now, and for some reason, it required a modification of the localhost resolving in the /etc/hosts file. the new version unexpectedly couldnt work with our previous setup while the older one would...
 
Well, if you are modifying localhost, that probably means a DNS problem...

But at least it works ! Glad you got some professional help!

Greetings from Warsaw Poland!
 
well our machine was customized to resolve a specific way, and we have some ipv6 stuff on the box, and unfortunately the new upgrade had entirely ZERO support for it. so they had to modify and add a line or two to the /etc/hosts
 
Originally posted by devindull
well our machine was customized to resolve a specific way, and we have some ipv6 stuff on the box, and unfortunately the new upgrade had entirely ZERO support for it. so they had to modify and add a line or two to the /etc/hosts
Would you please show me which lines were added to your /etc/hosts file please.
I've the same problem on my webserver.

Thank you in advance.
 
127.0.0.1 localhost localhost.my.domain
207.150.163.130 its.inter5.org
noc.intrac.net 207.150.163.130
207.150.163.131 noc.intrac.net
noc.intrac.net 207.150.163.130
its.inter5.org 207.150.163.130
 
Originally posted by devindull
127.0.0.1 localhost localhost.my.domain
207.150.163.130 its.inter5.org
noc.intrac.net 207.150.163.130
207.150.163.131 noc.intrac.net
noc.intrac.net 207.150.163.130
its.inter5.org 207.150.163.130

Ok we solved the problem.
It was related to the IPv6 loopback ::1 in the /etc/hosts file, i commented that line and webmail works again.
Thanks a lot for your time. =)
 
Back
Top