A NOTE has been added to this issue. ====================================================================== http://www.dbmail.org/mantis/view.php?id=290 ====================================================================== Reported By: moje Assigned To: ====================================================================== Project: DBMail Issue ID: 290 Category: Database layer Reproducibility: always Severity: block Priority: normal Status: new ====================================================================== Date Submitted: 04-Jan-06 19:44 CET Last Modified: 04-Jan-06 21:20 CET ====================================================================== Summary: Unable to create INBOX (or trash and next ...) if USER is not in dbmail_users (using LDAP auth) Description: errormsg: dbpgsql.c, db_query: Error executing query [INSERT INTO dbmail_mailboxes (name, owner_idnr,seen_flag, answered_flag, deleted_flag, flagged_flag, recent_flag, draft_flag, permission) VALUES ('Trash', '500', 1, 1, 1, 1, 1, 1, 2)] : [ERROR: insert or update on table "dbmail_mailboxes" violates foreign key constraint "dbmail_mailboxes_owner_idnr_fkey" DETAIL: Key (owner_idnr)=(500) is not present in table "dbmail_users". ]
Recomendation: Create user in dbmail_users if auth is success, but user don't exists. ====================================================================== ---------------------------------------------------------------------- aaron - 04-Jan-06 21:00 ---------------------------------------------------------------------- Please set trace_syslog = 5 and post more of the output. I'm looking for db.c,db_user_find_create: user_idnr [500] If we don't see that, then I'll instrument some more code and have you test again. ---------------------------------------------------------------------- moje - 04-Jan-06 21:20 ---------------------------------------------------------------------- i have trace_syslog on level 5. problem is in file db.c, function db_createmailbox() if LDAP auth is in use, no users are in dbmail_users and default constraint is don't allow create mailboxes for users which are not in dbmail_users. Current solution is exit from db_createmailbox(). better may be create user and than create mailbox. Issue History Date Modified Username Field Change ====================================================================== 04-Jan-06 19:44 moje New Issue 04-Jan-06 21:00 aaron Note Added: 0000968 04-Jan-06 21:20 moje Note Added: 0000972 ======================================================================
