On Mon, Feb 02, 2004 at 08:35:35PM +0000, A James Lewis wrote:
> 
> OK, I may be way off the mark, but LMTP seems to be a way to bypass
> dbmail-smtp and deliver stuff into DBMAIL from an MTA (Postfix).
> 
> I've tried this, and the conversation between postfix and dbmail-lmtp
> didn't look encouraging!
> 
> I get a "503 Message not received 0 FAIL." in the log, and tcpdump/manual
> attempts seem to suggest that it gave up recieving the message half way
> through and threw lots of errors as it tried to interpret the rest of the
> message as commands!
> 
> I'm confused!  I can't seem to get any messages delivered into dbmail
> 2.0rc1 via any route!  has anyone got it working with postgres....
> dbmail-smtp, or lmtp?
> 
> Ahhh, just another look at the log shows the same problem I have with
> dbamil-smtp... It seems there may be a bug in the "Postgres" db libraries"
> because both seem to try to create mailboxes with owner_idnr=0 rather than
> the correct value for the user in question!
> 
> Feb  2 20:14:27 dozer dbmail/lmtpd[16990]: 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:  insert
> or update on table "mailboxes" violates foreign key constraint "$1"
> DETAIL:  Key (owner_idnr)=(0) is not present in table "users". ]
> Feb  2 20:14:27 dozer dbmail/lmtpd[16990]: db.c,db_createmailbox: could
> not create mailbox
> Feb  2 20:14:27 dozer dbmail/lmtpd[16990]: db.c, db_find_create_mailbox:
> seriously could not create mailbox [INBOX]
> Feb  2 20:14:27 dozer dbmail/lmtpd[16990]: db.c,db_insert_message: error
> finding and/or creating mailbox [INBOX]

Aaron Stone mentioned the fix in an earlier message on the list:
INSERT INTO users (userid, passwd, encryption_type) VALUES ('*', '*', 'md5');
UPDATE users SET user_idnr = 0 WHERE userid = '*';

As part of the delivery, the message is first inserted into a system
mailbox.

This needs to get added to the sql scripts used to create the tables.

xn

Reply via email to