Mailing List Archive

Congrats on 2.0rc1, and a little fix to misc.c
Hey everyone,

The 2.0rc1 release looks awesome! Neat LMTP stuff, too ;-)

One little gotcha, misc.c is missing time.h. Just add this line up at the top:

#include <time.h>

and have fun testing it out!

Kudos to Ilja, who did a *lot* of work integrating recent patches and bugfixes
and did a huge job integrating my LMTP and Sorting work.

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!

Aaron
Re: Congrats on 2.0rc1, and a little fix to misc.c [ In reply to ]
Aaron, don't forget all the work you did yourself!
When are you going to start working with us here at IC&S in the
Netherlands? :)


On 30-jan-04, at 18:53, Aaron Stone wrote:

>
> Hey everyone,
>
> The 2.0rc1 release looks awesome! Neat LMTP stuff, too ;-)
>
> One little gotcha, misc.c is missing time.h. Just add this line up at
> the top:
>
> #include <time.h>
>
> and have fun testing it out!
>
> Kudos to Ilja, who did a *lot* of work integrating recent patches and
> bugfixes
> and did a huge job integrating my LMTP and Sorting work.
>
> 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!
>
> Aaron
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>
_________________________
E.J.A. van Beek
ICT Manager
IC&S
T: +31 30 6355730
F: +31 30 6355731

PGP-key:
www.ic-s.nl/keys/eelco.txt
Re: Congrats on 2.0rc1, and a little fix to misc.c [ In reply to ]
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)
Re: Congrats on 2.0rc1, and a little fix to misc.c [ In reply to ]
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 <dbmail@tmueller.com> 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, '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)
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>



--
Re: Congrats on 2.0rc1, and a little fix to misc.c [ In reply to ]
Hi Aaron,

> 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 UPDATE isn't necessary for postgres, the insert does what it should
do.

That fixed the problem for dbmail-smtp.
When I try to login with IMAP I get the segfault Christian G. Warden
described.

> 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.

A global mail filter could be very useful yes!


--
MfG Thomas Mueller - http://www.tmueller.com for pgp key (95702B3B)
Re: Congrats on 2.0rc1, and a little fix to misc.c [ In reply to ]
On Sat, Jan 31, 2004 at 09:32:29PM -0000, Aaron Stone wrote:
> 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 = '*';

In case anyone is just trying to cut and paste (like I did :),
UPDATE users SET user_idnr = 0 WHERE userid = '*';

> 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.

To prevent someone from logging into the temporary account, you can set
the encryption type to md5, for example.

xn
Re: Congrats on 2.0rc1, and a little fix to misc.c [ In reply to ]
Hi,

I'm back from a weekend of coaching my rowing crew, cycling and storm,
with absolutely no computer in sight :).

I'll take of the bugs your reporting here and will update CVS of course.
RC2 will probably be out later this week.

Aaron Stone wrote:
> Hey everyone,
>
> The 2.0rc1 release looks awesome! Neat LMTP stuff, too ;-)
>
> One little gotcha, misc.c is missing time.h. Just add this line up at the top:
>
> #include <time.h>
My wrong.. It does compile (without compiler warnings) on OpenBSD.. Need
to do some compiling/testing on other platforms I guess.
>
> and have fun testing it out!
>
> Kudos to Ilja, who did a *lot* of work integrating recent patches and bugfixes
> and did a huge job integrating my LMTP and Sorting work.
and thanks to Aaron for all his work
>
> 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!
Agreed!

Ilja
--
IC&S
Stadhouderslaan 57
3583 JD Utrecht

PGP-key:
http://www.ic-s.nl/keys/ilja.txt