1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Webmail Error: Error connecting to IMAP server.

Discussion in 'Plesk for Linux - 8.x and Older' started by devindull, Apr 27, 2006.

  1. devindull

    devindull Guest

    0
     
    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"]
     
  2. cajetanus

    cajetanus Guest

    0
     
    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...
     
  3. cajetanus

    cajetanus Guest

    0
     
    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....
     
  4. devindull

    devindull Guest

    0
     
    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?
     
  5. cajetanus

    cajetanus Guest

    0
     
    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 !
     
  6. devindull

    devindull Guest

    0
     
    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.
     
  7. devindull

    devindull Guest

    0
     
    psa_hotfix8_v7.5.4_build75060413.12_os_FreeBSD_4.9_i386.txt

    That's the hotfix that caused the entire meltdown.
     
  8. cajetanus

    cajetanus Guest

    0
     
    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 ?
     
  9. devindull

    devindull Guest

    0
     
    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 postmaster@its.inter5.org
    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 postmaster@its.inter5.org
    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 postmaster@its.inter5.org
    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';
     
  10. cajetanus

    cajetanus Guest

    0
     


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

    You do seem to get a connection, if you look at these lines:
    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 ?
     
  11. devindull

    devindull Guest

    0
     
    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!!!! :)
     
  12. cajetanus

    cajetanus Guest

    0
     
    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 !
     
  13. devindull

    devindull Guest

    0
     
    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...
     
  14. cajetanus

    cajetanus Guest

    0
     
    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!
     
  15. devindull

    devindull Guest

    0
     
    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
     
  16. Flamenetworks

    Flamenetworks Basic Pleskian

    23
    90%
    Joined:
    Mar 5, 2004
    Messages:
    52
    Likes Received:
    0
    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.
     
  17. devindull

    devindull Guest

    0
     
    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
     
  18. Flamenetworks

    Flamenetworks Basic Pleskian

    23
    90%
    Joined:
    Mar 5, 2004
    Messages:
    52
    Likes Received:
    0
    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. =)
     
Loading...