I just solved it. To fix, in my "dbmail.conf" I changed the "field_uid" from "sAMAccountName" to "uid". After looking in "auth_ldap.c" I saw that it was requesting based off "_ldap_cfg.field_uid" so I began looking at the packet traces for the LDAP query and response and did not see "sAMAccountName" in the response, curiously enough, but did see "uid". I've verified that it is working for me now.
Thanks, Peter -----Original Message----- From: Peter Smith Sent: Thursday, February 01, 2018 10:16 AM To: 'DBmail@dbmail.org' <DBmail@dbmail.org> Subject: Re: [Dbmail] Problems creating Mailboxes Thank you for the response. I am using PostGreSQL, the auth is LDAP, and I'm running at maximum logging level. The error is isolated, however here's some entries around the error: Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[db] db_imap_split_mailbox(+2387): Preparing mailbox [DELETEME] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[db] db_findmailbox(+2133): looking for mailbox with FQN [DELETEME]. Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[misc] mailbox_remove_namespace(+217): [DELETEME] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Database:[db] db_con_get(+314): [0xe7b570] connection from pool Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Database:[db] db_stmt_prepare(+477): [0xe7b570] [SELECT mailbox_idnr FROM dbmail_mailboxes WHERE owner_idnr = ? AND name ILIKE ?] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Database:[db] db_stmt_set_u64(+497): [0x7f6fc4052d10] 1:[<USERID>] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Database:[db] db_stmt_set_str(+485): [0x7f6fc4052d10] 2:[DELETEME] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Database:[db] db_con_close(+342): [0xe7b570] connection to pool Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[db] db_createmailbox(+2612): creating shadow user for [<USERID>] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[db] db_user_find_create(+4056): user_idnr [<USERID>] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[auth] ldap_con_get(+130): connection [0x7f6fc4002070] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[auth] ldap_con_get(+130): connection [0x7f6fc4002070] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[auth] authldap_search(+281): [(uidNumber=<USERID>)] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Debug:[auth] auth_get_userid(+694): returned value is [(null)] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xeb55e0] Error:[db] db_createmailbox(+2615): unable to find or create sql shadow account for useridnr [<USERID>] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xe7b000] Debug:[imap] _ic_cb_leave(+724): handling imap session [0xed6bf0] client_state [] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xe7b000] Debug:[clientbase] ci_uncork(+210): [0xf7a6c0] [28] [28], [4000] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xe7b000] Debug:[imap] imap_handle_exit(+463): [0xed6bf0] state [2] command_status [1] [CREATE] returned with status [0] Feb 01 10:08:23 linux dbmail-imapd[19484]: [0xe7b000] Debug:[clientbase] ci_write(+347): [0xf7a6c0] S > [28/28:* BYE internal dbase error ] "uidNumber" in this case is correct and matches my USERID, as does "useridnr". The account I'm using is my own personal account and I can read the mailboxes just fine. I do remember a time when I was able to create mailboxes.. I suspect there's a problem in the "auth_get_userid" since it is returning NULL? If I manually do an LDAPSEARCH using the "uidNumber", it does in fact find my account and returns everything that I expect. ldapsearch -W -x -H ldaps://ldap -D <MY DN> -b <MY LOCAL ORG BITS> '(uidNumber=<USERID>)' Thanks, Peter ________________________________ UT Southwestern Medical Center The future of medicine, today. _______________________________________________ DBmail mailing list DBmail@dbmail.org http://lists.nfg.nl/mailman/listinfo/dbmail