Author Topic: IMAP Error: Empty startup greeting in 0.4.2  (Read 13624 times)

Offline Son

  • Newbie
  • *
  • Posts: 9
IMAP Error: Empty startup greeting in 0.4.2
« on: October 27, 2010, 05:09:57 AM »
Hello,

since a new update from 0.3.1 to 0.4.2 we cannot log in with old settings.

This is the error from log file
Code: [Select]

[27.Oct.2010 12:34:48 +0400]: IMAP Error: Empty startup greeting (127.0.0.1:994) in /usr/local/www/roundcube/program/include/rcube_imap.php on line 143 (POST /newcube/?_task=&_action=login)


Code: [Select]

$rcmail_config['default_host'] = 'ssl://127.0.0.1';
//$rcmail_config['default_host'] = 'ssl://localhost';   #OLD SETTING (NOT WORKED IN NEW 0.4.2 BUT SUCCES IN 0.3.1)

// TCP port used for IMAP connections
//$rcmail_config['default_port'] = 993;         #POP3D
//$rcmail_config['default_port'] = 994;         #DOVECOT
//$rcmail_config['default_port'] = 143;         #NOSSL
$rcmail_config['default_port'] = 943;           #OLD SETTING (NOT WORKED IN NEW 0.4.2 BUT SUCCES IN 0.3.1)

// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check" to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = 'PLAIN';

// If you know your imap's root directory and its folder delimiter,
// you can specify them here. Otherwise they will be determined automatically.
$rcmail_config['imap_root'] = null;
$rcmail_config['imap_delimiter'] = null;

// By default IMAP capabilities are readed after connection to IMAP server
// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
// after login. Set to True if you've got this case.
$rcmail_config['imap_force_caps'] = false;

// IMAP connection timeout, in seconds. Default: 0 (no limit)
$rcmail_config['imap_timeout'] = 0;




How can we start with new version?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,638
    • http://SKaero.com/
IMAP Error: Empty startup greeting in 0.4.2
« Reply #1 on: October 27, 2010, 05:23:44 AM »
Can you enable imap_debug and post the output.

Offline Son

  • Newbie
  • *
  • Posts: 9
IMAP Error: Empty startup greeting in 0.4.2
« Reply #2 on: October 27, 2010, 06:25:22 AM »
I set
$rcmail_config['debug_level'] = 8;
but in Login site "console field" is empty

Option
// Log IMAP conversation to /imap or to syslog
$rcmail_config['imap_debug'] = true;

does not set in Log file any other messages. Here are latest logs(I try define & test in ports 994, 993 and host settings):

Code: [Select]
server# tail logs/errors
[27.Oct.2010 12:19:06 +0400]: IMAP Error: Authentication for mxtest@mxtest.log failed (LOGIN): a001 NO STARTTLS required in /usr/local/www/roundcube/program/include/rcube_imap.php on line 143 (POST /newcube/?_task=&_action=login)

[27.Oct.2010 12:21:43 +0400]: IMAP Error: Empty startup greeting (localhost:994) in /usr/local/www/roundcube/program/include/rcube_imap.php on line 143 (POST /newcube/?_task=&_action=login)

[27.Oct.2010 12:25:13 +0400]: IMAP Error: Empty startup greeting (localhost:993) in /usr/local/www/roundcube/program/include/rcube_imap.php on line 143 (POST /newcube/?_task=&_action=login)

[27.Oct.2010 12:25:18 +0400]: IMAP Error: Empty startup greeting (localhost:993) in /usr/local/www/roundcube/program/include/rcube_imap.php on line 143 (POST /newcube/?_task=&_action=login)

[27.Oct.2010 12:32:20 +0400]: IMAP Error: Authentication for mxtest@mxtest.log failed (LOGIN): a001 NO STARTTLS required in /usr/local/www/roundcube/program/include/rcube_imap.php on line 143 (POST /newcube/?_task=&_action=login)

[27.Oct.2010 12:34:48 +0400]: IMAP Error: Empty startup greeting (127.0.0.1:994) in /usr/local/www/roundcube/program/include/rcube_imap.php on line 143 (POST /newcube/?_task=&_action=login)


Code: [Select]
# uname -v
FreeBSD 7.2-STABLE #0: Thu Dec  3 07:54:24 UTC 2009

# php -v
PHP 5.2.11 (cli) (built: Dec  4 2009 08:40:08)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

# php -m
[PHP Modules]
bcmath
bz2
ctype
curl
date
dom
fileinfo
filter
ftp
gd
gettext
iconv
imap
json
ldap
libxml
mbstring
mcrypt
mysql
mysqli
openssl
pcre
pdf
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]
   

And this my Sockstat

Code: [Select]
# sockstat -l | grep 993
root     couriertcp 1093  3  tcp4   xx.xx.x.x:993     *:*
root     couriertcp 1093  5  tcp4   127.0.0.1:993         *:*

# sockstat -l | grep 994
dovecot  imap-login 46048 6  tcp4   x.x.x.x:994     *:*
dovecot  imap-login 46048 7  tcp4   127.0.0.1:994         *:*
dovecot  imap-login 45292 6  tcp4   x.x.x.x:994     *:*
dovecot  imap-login 45292 7  tcp4   127.0.0.1:994         *:*
dovecot  imap-login 10094 6  tcp4   x.x.x.x:994     *:*
dovecot  imap-login 10094 7  tcp4   127.0.0.1:994         *:*
root     dovecot    10073 7  tcp4   x.x.x.x:994     *:*
root     dovecot    10073 8  tcp4   127.0.0.1:994         *:*


Offline Son

  • Newbie
  • *
  • Posts: 9
IMAP Error: Empty startup greeting in 0.4.2
« Reply #3 on: October 27, 2010, 06:32:09 AM »
If our PHP worked ohne json.so included, the roundcube sent us empty blank login page.
With old version 0.3.1 roundcube succes worked with this module disabled.
I schould enable json.so in PHP to get the Login page. Otherwise roundcube will sent only white page with no error and no warnings (syslogs or apache log or otherelse)
« Last Edit: October 27, 2010, 06:35:19 AM by Son »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,215
IMAP Error: Empty startup greeting in 0.4.2
« Reply #4 on: October 27, 2010, 06:47:24 AM »
On upgrade it's good to run Roundcube Installer checks. There you should have seen that json is required now.

Offline Son

  • Newbie
  • *
  • Posts: 9
IMAP Error: Empty startup greeting in 0.4.2
« Reply #5 on: October 27, 2010, 07:20:09 AM »
Roundcube was installed from FreeBSD port
/usr/ports/mail/roundcube

I cannot find who ist this utility for check... can You please help me wit link to this installer check?

Regards

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,638
    • http://SKaero.com/
IMAP Error: Empty startup greeting in 0.4.2
« Reply #6 on: October 27, 2010, 07:31:26 AM »
I am not familiar with the FreeBSD port but the check are done when you go to /installer if you don't have the installer directory you could upload a copy from the RoundCube 0.4.2 file on Roundcube - Free webmail for the masses You will also need to change enable_installer to true in /config/main.inc.php

Offline Son

  • Newbie
  • *
  • Posts: 9
IMAP Error: Empty startup greeting in 0.4.2
« Reply #7 on: October 27, 2010, 08:12:53 AM »
Code: [Select]

[27.Oct.2010 15:51:01 +0400]: S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[27.Oct.2010 15:51:01 +0400]: C: cp01 CAPABILITY
[27.Oct.2010 15:51:01 +0400]: S: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH AUTH=PLAIN AUTH=LOGIN
[27.Oct.2010 15:51:01 +0400]: S: cp01 OK Capability completed.
[27.Oct.2010 15:51:01 +0400]: C: a001 LOGIN "mxtest@mxtest.log" "test"
[27.Oct.2010 15:51:01 +0400]: S: a001 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in
[27.Oct.2010 15:51:01 +0400]: C: cp01 CAPABILITY
[27.Oct.2010 15:51:01 +0400]: S: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH
[27.Oct.2010 15:51:01 +0400]: S: cp01 OK Capability completed.
[27.Oct.2010 15:51:01 +0400]: C: ns1 NAMESPACE
[27.Oct.2010 15:51:01 +0400]: S: * NAMESPACE (("" ".")) NIL NIL
[27.Oct.2010 15:51:01 +0400]: S: ns1 OK Namespace completed.
[27.Oct.2010 15:51:01 +0400]: C: ghd LIST "" ""
[27.Oct.2010 15:51:01 +0400]: S: * LIST (\Noselect) "." ""
[27.Oct.2010 15:51:01 +0400]: S: ghd OK List completed.
[27.Oct.2010 15:51:01 +0400]: C: I LOGOUT


Offline Son

  • Newbie
  • *
  • Posts: 9
IMAP Error: Empty startup greeting in 0.4.2
« Reply #8 on: October 27, 2010, 08:53:55 AM »
Ok.
I have been installed a blank copy roundcubemail-0.4.2.tar.gz via tar -xzf & start installation via /installer

I set new parameter, and save main.inc.php & db.inc.php in to /config/ directory. After installation all options are OK. I created blank MySql base and run
mysql --user=roundcube --password=HECum roundcube < SQL/mysql.initial.sql
No errors. Ok.
Log in via HTTP: Super! this worked. All folders are downloaded, but no any message are displayed. Menu over is red - Serverfehler (OK)
If I click on any folder, get same error with red field Serverfehler (OK)
Set
$rcmail_config['debug_level'] = 13;

Code: [Select]
[27-Oct-2010 16:51:33 +0400]: S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc.  See COPYING for distribution information.
[27-Oct-2010 16:51:33 +0400]: C: a001 LOGIN &quot;mxtest@mxtest.log&quot; &quot;test&quot;
[27-Oct-2010 16:51:33 +0400]: S: a001 OK LOGIN Ok.
[27-Oct-2010 16:51:33 +0400]: C: sel1 SELECT &quot;INBOX&quot;
[27-Oct-2010 16:51:33 +0400]: S: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
[27-Oct-2010 16:51:33 +0400]: S: * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
[27-Oct-2010 16:51:33 +0400]: S: * 48 EXISTS
[27-Oct-2010 16:51:33 +0400]: S: * 0 RECENT
[27-Oct-2010 16:51:33 +0400]: S: * OK [UIDVALIDITY 1260532345] Ok
[27-Oct-2010 16:51:33 +0400]: S: * OK [MYRIGHTS &quot;acdilrsw&quot;] ACL
[27-Oct-2010 16:51:33 +0400]: S: sel1 OK [READ-WRITE] Ok
[27-Oct-2010 16:51:33 +0400]: C: fuid FETCH 48 (UID)
[27-Oct-2010 16:51:33 +0400]: S: * 48 FETCH (UID 1113)
[27-Oct-2010 16:51:33 +0400]: S: fuid OK FETCH completed.
[27-Oct-2010 16:51:33 +0400]: C: srch1 SEARCH ALL UNSEEN
[27-Oct-2010 16:51:33 +0400]: S: * SEARCH
[27-Oct-2010 16:51:33 +0400]: S: srch1 OK SEARCH done.
[27-Oct-2010 16:51:33 +0400]: C: I LOGOUT


same error with Dovecot. Any Idea ?

Thank!
« Last Edit: October 27, 2010, 08:58:57 AM by Son »

Offline Son

  • Newbie
  • *
  • Posts: 9
IMAP Error: Empty startup greeting in 0.4.2
« Reply #9 on: October 27, 2010, 09:01:08 AM »
Hm... change $rcmail_config['debug_level'] = 13; to
$rcmail_config['debug_level'] = 8;

solved problem. Messages donwloaded and displayed.
:confused:

Offline Son

  • Newbie
  • *
  • Posts: 9
IMAP Error: Empty startup greeting in 0.4.2
« Reply #10 on: October 27, 2010, 09:16:58 AM »
If this Info is now possible help for any users...
MySql table should first altered and not convertet! Convert this in InnoDB from MyIsam only if alter is completed. Otherwise MySql sent Errors.

Also my code for alter table in upgrade from 0.3.1 up to 0.4.2 step by step through phpMyAdmin:

Code: [Select]
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;

ALTER TABLE `messages` DROP FOREIGN KEY `user_id_fk_messages`;
ALTER TABLE `cache` DROP FOREIGN KEY `user_id_fk_cache`;
ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`;
ALTER TABLE `identities` DROP FOREIGN KEY `user_id_fk_identities`;

ALTER TABLE `messages` ADD CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`)
 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `cache` ADD CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`)
 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `identities` ADD CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`)
 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `contacts` ALTER `name` SET DEFAULT '';
ALTER TABLE `contacts` ALTER `firstname` SET DEFAULT '';
ALTER TABLE `contacts` ALTER `surname` SET DEFAULT '';

ALTER TABLE `identities` ADD INDEX `user_identities_index` (`user_id`, `del`);
ALTER TABLE `identities` ADD `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00' AFTER `user_id`;

# Convert table
ALTER TABLE cache ENGINE=InnoDB;
ALTER TABLE contacts ENGINE=InnoDB;
ALTER TABLE identities ENGINE=InnoDB;
ALTER TABLE messages ENGINE=InnoDB;
ALTER TABLE session ENGINE=InnoDB;
ALTER TABLE users ENGINE=InnoDB;


CREATE TABLE `contactgroups` (
  `contactgroup_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY(`contactgroup_id`),
  CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  INDEX `contactgroups_user_index` (`user_id`,`del`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;

CREATE TABLE `contactgroupmembers` (
  `contactgroup_id` int(10) UNSIGNED NOT NULL,
  `contact_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  PRIMARY KEY (`contactgroup_id`, `contact_id`),
  CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`)
    REFERENCES `contactgroups`(`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`)
    REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE
) /*!40000 ENGINE=INNODB */;

/*!40014 SET FOREIGN_KEY_CHECKS=1 */;

Thank You