You're correct in that I have no dbmail-delivery-user (0).

Do I just add this manually?

I'm assuming I only need the record in the users table.
Does the data in any of the other fields matter?

Thanks,

Brian Winkers

Roel Rozendaal - IC&S wrote:

Hi Brian,

What version are you running? Please keep in mind that dbmail 2.0 inserts messages first using a dbmail-delivery-user (userid 0) and later updates the inserted message. From your logs i see that a foreign key constraint fails so you probably don't have this delivery-user in your system.

regards roel

Op 23-feb-04 om 10:01 heeft Brian Winkers het volgende geschreven:

It seems that dbmail -smtp is failing to set the owner_idnr correctly. (logs below)

The first query:

   [SELECT user_idnr FROM users WHERE userid='[EMAIL PROTECTED]']

should get the correct userid, since I do when logged into mysql as dbmail user.

  mysql> SELECT user_idnr FROM users WHERE userid='[EMAIL PROTECTED]';
  +-----------+
  | user_idnr |
  +-----------+
  |         1 |
  +-----------+
  1 row in set (0.00 sec)

Yet the owner_idnr is set to zero in the next query.

[SELECT mailbox_idnr FROM mailboxes WHERE LOWER(name) = LOWER('INBOX') AND owner_idnr='0']

The queries in the "mysql.log" verify the queries above are running as shown in the mail.log.

It fails on a foriegn key constraing because there is no owner_idnr that is zero. Removing the foreign keys won't help since dbmail would still assign all the messages to mailbox owner "zero".

Any suggestions?


Below is the pertinet mail.log info.

Feb 23 02:46:20 debian dbmail/smtp[9699]: dbmysql.c,db_query: executing query [SELECT user_idnr FROM users WHERE userid='[EMAIL PROTECTED]'] Feb 23 02:46:20 debian dbmail/smtp[9699]: pipe.c, resolve_address: added user [EMAIL PROTECTED] id [1] to delivery list Feb 23 02:46:20 debian dbmail/smtp[9699]: misc.c,create_unique_id: created: d17f8f3488fea9f4c832fa2393756465 Feb 23 02:46:20 debian dbmail/smtp[9699]: dbmysql.c,db_query: executing query [SELECT mailbox_idnr FROM mailboxes WHERE LOWER(name) = LOWER('INBOX') AND owner_idnr='0'] Feb 23 02:46:20 debian dbmail/smtp[9699]: dbmysql.c,db_query: executing query [INSERT INTO mailboxes (name, owner_idnr,seen_flag, answered_flag, deleted_flag, flagged_flag, recent_flag, draft_flag, permission) VALUES ('INBOX', '0', 1, 1, 1, 1, 1, 1, 2)] Feb 23 02:46:20 debian dbmail/smtp[9699]: dbmysql.c,db_query: query [INSERT INTO mailboxes (name, owner_idnr,seen_flag, answered_flag, deleted_flag, flagged_flag, recent_flag, draft_flag, permission) VALUES ('INBOX', '0', 1, 1, 1, 1, 1, 1, 2)] failed Feb 23 02:46:20 debian dbmail/smtp[9699]: dbmysql.c,db_query: mysql_real_query failed: Cannot add or update a child row: a foreign key constraint fails


_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


_________________________
R.A. Rozendaal
IC&S
T: +31 30 63 55 736
F: +31 30 63 55 731
www.ic-s.nl

_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail





Reply via email to