Help - I need somebody, Help - not just anybody, Help - I need somebody nnnoooooowwwww.

I've been working through dovecot.conf and main.inc.php and db.inc.php and have tried various changes but nothing I do has been able to resolve this problem.

The MySQL connection is clearly working as the session and user tables are being populated.
The Dovecot connection appears to be working as the log indicates a "secured" access.
There is data in the /home/postmaster/Maildir directory and I'm logging in with "postmaster".
I've reset the password for "postmaster" so I know I'm entering the correct details.

Yet still I get "Login failed".

I must be missing something - are you able to give me any clues as to where to look?

Cheers
Murray


On 19 April 2011 23:56, Murray Collingwood <murray@focus-computing.com.au> wrote:
Hi folks

I would appreciate some ideas of where to look to try and solve my problem.

I am setting up a new server (have RoundCube installed on my old server and has been working perfectly for over 2 years).
I have run the install on Debian Squeeze using aptitude, including 'roundcube', 'roundcube-core' and 'roundcube-mysql'.

The database has been created and contains 6 tables.

I have Apache2 and MySQL5 running and they seem to be working fine. 

In my browser I type http://server-url/roundcube and the login page appears.

I enter "postmaster" as the username and the password but I get the message "Login failed"

In the "syslog" I get messages that indicate the IMAP login was successful (to Dovecot), however it immediately logs out:
Apr 19 23:10:41 ds5683 dovecot: imap-login: Login: user=<postmaster>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Apr 19 23:10:41 ds5683 dovecot: IMAP(postmaster): Disconnected: Logged out bytes=39/443

In the roundcube "errors" log (the php log file) I get messages indicating the database connection may not be working as in these:
[19-Apr-2011 23:05:10 +1000]: PHP Error: Failed to create new user in /usr/share/roundcube/program/include/rcube_user.php on line 451 (POST /roundcube/?_task=&_action=login)
[19-Apr-2011 23:05:10 +1000]: PHP Error: Failed to create a user record. Maybe aborted by a plugin? (POST /roundcube/?_task=&_action=login)

However in the database there are actually records being created in the 'users' table:
user_id username mail_host alias created last_login language preferences
1 postmaster localhost   2011-04-19 23:22:23 2011-04-19 23:22:23 en_US NULL

There's data in the 'session' table also:
sess_id created changed ip vars
mm6ld61j9ekan5fief4ocikig3 2011-04-19 23:22:23 2011-04-19 23:22:23 122.148.149.28 language|s:5:"en_US";auth_time|i:1303219343;temp|b...


The Apache log shows me a little more detail about the error but essentially indicates that the database error was an attempt to add a duplicate primary key:
[Tue Apr 19 23:10:23 2011] [error] [client 122.148.149.28] MDB2 Error: constraint violation (-3): _doQuery: [Error message: Could not execute statement]\n[Last executed query: EXECUTE mdb2_statement_mysql_3d2cec1a51699f95fdead7b1b9c2cc9f52dd15da3 USING @0, @1, @2]\n[Native code: 1062]\n[Native message: Duplicate entry 'mm6ld61j9ekan5fief4ocikig3' for key 'PRIMARY']\n


The question is why is RoundCube trying to add a duplicate entry... what is making it think it needs to add this user again???

If somebody can point me in the right direction as to what I should be looking for that would be really helpful.

I've Googled all over the place and while there are a few articles about this problem of creating new users there was no definitive solution, and none of the suggestions offered seemed to help me at all.  I tried looking for security issues but couldn't find any.  Found some table fields that were not supposed to be 'null' and allowed them to be hoping that this may solve the problem as one website suggested, but again no luck.

Cheers
Murray


--
Murray Collingwood
Focus Computing
p +61 415 24 26 24
http://www.focus-computing.com.au



--
Murray Collingwood
Focus Computing
p +61 415 24 26 24
http://www.focus-computing.com.au