The new delivery chain requires a temporary account with the fixed user id
number 0. The next release candidate should probably include an appropriate
insert/update to add this user (note that it needs to be an insert and then an
update, because the insert alone with '0' triggers the auto_increment.

INSERT INTO users (user_idnr, userid, passwd) VALUES (0, '*', '*');
UPDATE userid SET user_idnr = 0 WHERE username = '*';

The username '*' can be pretty much anything that you'll never be receiving
mail for. Some more security work may need to be done to ensure that this
account cannot be logged into, or on the flip side, to make the account into a
postmaster account where certain types of dead-mail and bounces and such
arrive. It may even be feasible to run Sieve scripts against all messages as
they pass throught the postmaster and thereby establish a global mail filter.
Lots of ideas for this, and I'd love to get a discussion going if this sounds
like a useful feature to anyone out there.

Aaron


Thomas Mueller <[EMAIL PROTECTED]> said:

> 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, '[EMAIL PROTECTED]', '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 [EMAIL PROTECTED]
> 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)
> _______________________________________________
> Dbmail-dev mailing list
> [email protected]
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> 



-- 



Reply via email to