Hi Aaron,
> This code's going to need a lot of hammering on. Ilja and I just worked out
> some of the major kinks in the new delivery chain on Monday / Tuesday of this
> week, so beta testers are really, really needed to help make this thing solid!
I took current cvs code and have several problems. I dropped the
database and recreated it from scratch.
This is what I have in my database (I checked what dbmail-adduser did):
----------------------------------------------------------------------
INSERT INTO users (user_idnr, userid, passwd, client_idnr, maxmail_size,
curmail_size, encryption_type, last_login)
VALUES (1, 'admin@geht-schon.de', 'password', 0, 1000000000, 0, '',
'2004-01-01 00:00:00');
INSERT INTO mailboxes (owner_idnr, name, seen_flag, answered_flag,
deleted_flag, flagged_flag, recent_flag, draft_flag, no_inferiors,
no_select, permission)
VALUES (1, 'INBOX', 0, 0, 0, 0, 0, 0, 0, 0, 2);
INSERT INTO aliases (alias, deliver_to, client_idnr)
VALUES ('@geht-schon.de', '1', 0);
----------------------------------------------------------------------
dbmail-smtp uses the wrong owner_idnr:
----------------------------------------------------------------------
Jan 30 23:15:40 server dbmail/smtp[1502]: insert_messages(): resolving
address [admin@geht-schon.de]
Jan 30 23:15:40 server dbmail/smtp[1502]: dbpgsql.c, db_query: Error
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)] : [.ERROR: $1
referential integrity violation - key referenced from mailboxes not found
in users ]
Jan 30 23:15:40 server dbmail/smtp[1502]: db.c,db_createmailbox: could
not create mailbox
Jan 30 23:15:40 server dbmail/smtp[1502]: db.c, db_find_create_mailbox:
seriously could not create mailbox [INBOX]
Jan 30 23:15:40 server dbmail/smtp[1502]: db.c,db_insert_message: error
finding and/or creating mailbox [INBOX]
Jan 30 23:15:40 server dbmail/smtp[1502]: store_message_temp(): returned
-1, aborting
Jan 30 23:15:40 server dbmail/smtp[1502]: insert_messages(): failed to
store temporary message.
----------------------------------------------------------------------
When I login using imap, dbmail crashes with a SIGSEGV:
----------------------------------------------------------------------
Jan 30 23:40:10 server dbmail/imap4d[1700]: dbpgsql.c,db_query:
executing query [.SELECT mbx.name, mbx.mailbox_idnr, mbx.owner_idnr FROM
mailboxes mbx LEFT JOIN acl ON mbx.mailbox_idnr = acl.mailbox_id WHERE
(acl.user_id = '1' AND acl.lookup_flag = '1') OR mbx.owner_idnr = '1']
Jan 30 23:40:10 server dbmail/imap4d[1700]:
db.c,db_list_mailboxes_by_regex: comparing mailbox [INBOX] to regular
expression
Jan 30 23:40:10 server dbmail/imap4d[1700]:
db.c,db_list_mailboxes_by_regex: regex match INBOX
Jan 30 23:40:10 server dbmail/imap4d[1700]:
db.c,db_findmailbox_by_regex: found [1] mailboxes
Jan 30 23:40:10 server dbmail/imap4d[1700]: dbpgsql.c,db_query:
executing query [SELECT owner_idnr FROM mailboxes WHERE mailbox_idnr =
'1']
Jan 30 23:40:10 server dbmail/imap4d[1700]: dbpgsql.c,db_query:
executing query [SELECT name FROM mailboxes WHERE mailbox_idnr = '1']
Jan 30 23:40:10 server dbmail/imap4d[1700]: ChildSighandler(): got
signal [11]
Jan 30 23:40:10 server dbmail/imap4d[1700]: ChildSighandler(): cannot
ignore this. Terminating
Jan 30 23:40:10 server dbmail/imap4d[1699]: ParentSigHandler(): got
signal [17]
Jan 30 23:40:10 server dbmail/imap4d[1699]: StartServer(): child [1700]
has exited
Jan 30 23:40:10 server dbmail/imap4d[1699]: StartServer(): creating new
child
Jan 30 23:40:10 server dbmail/imap4d[1736]: CreateChild(): signal
handler placed, going to perform task now
----------------------------------------------------------------------
Is there anything I can do to help finding this crash?
--
MfG Thomas Mueller -
http://www.tmueller.com for pgp key (95702B3B)