Mailing List Archive

Problems creating Mailboxes
It has been quite a while but I'm fairly certain that I used to be able to create folders on my DBMAIL back-end. As of right now, however, I am not able to make new mailboxes.

Should I create a Bugreport?

Ultimately I'm getting the following in dbmail.err .

Jan 30 16:06:27 linux dbmail-imapd[8144]: [0x21c0450] Error:[db] db_createmailbox(+2615): unable to find or create sql shadow account for useridnr [<my userid>]

I performed the following, manually, just to test (normally I use Evolution and of course get errors trying to create a new folder)

[user@linuxclient tmp]$ openssl s_client -connect linux:993
CONNECTED(00000003)
depth=2 C = SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = AddTrust External CA Root
verify return:1
depth=1 C = US, O = Internet2, OU = InCommon, CN = InCommon Server CA
verify return:1
<SNIP>
* OK [CAPABILITY IMAP4rev1 STARTTLS ID LOGINDISABLED LITERAL+] dbmail 3.2.0 ready.
- LOGIN <username> <password>
- OK [.CAPABILITY IMAP4rev1 ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE ID UIDPLUS WITHIN CONDSTORE LITERAL+ ENABLE QRESYNC] User <username> authenticated
- CREATE "Lists/swedishbricks/2018"
* BYE internal dbase error
- CREATE "DELETEME"
* BYE internal dbase error
- LOGOUT
* BYE
- OK LOGOUT completed
read:errno=0
[user@linuxclient tmp]$

Above I try to create the mailbox "Lists/swedishbricks/2018" which is actually where I'm trying to get. As a basic test I also try to create the mailbox "DELETEME" which also fails.

Thanks,
Peter

________________________________

UT Southwestern


Medical Center



The future of medicine, today.
Re: Problems creating Mailboxes [ In reply to ]
Hi.

which DB are you using?

also which auth? SQL, LDAP,.. ?

do you have the logging level turned up? are there any other errors as
well?

Regards

On 2018-01-30 23:25, Peter Smith wrote:

> It has been quite a while but I'm fairly certain that I used to be able to create folders on my DBMAIL back-end. As of right now, however, I am not able to make new mailboxes.
>
> Should I create a Bugreport?
>
> Ultimately I'm getting the following in dbmail.err .
>
> Jan 30 16:06:27 linux dbmail-imapd[8144]: [0x21c0450] Error:[db] db_createmailbox(+2615): unable to find or create sql shadow account for useridnr [<my userid>]
>
> I performed the following, manually, just to test (normally I use Evolution and of course get errors trying to create a new folder)
>
> [user@linuxclient tmp]$ openssl s_client -connect linux:993
>
> CONNECTED(00000003)
>
> depth=2 C = SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = AddTrust External CA Root
>
> verify return:1
>
> depth=1 C = US, O = Internet2, OU = InCommon, CN = InCommon Server CA
>
> verify return:1
>
> <SNIP>
>
> * OK [CAPABILITY IMAP4rev1 STARTTLS ID LOGINDISABLED LITERAL+] dbmail 3.2.0 ready.
>
> - LOGIN <username> <password>
>
> - OK [.CAPABILITY IMAP4rev1 ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE ID UIDPLUS WITHIN CONDSTORE LITERAL+ ENABLE QRESYNC] User <username> authenticated
>
> - CREATE "Lists/swedishbricks/2018"
>
> * BYE internal dbase error
>
> - CREATE "DELETEME"
>
> * BYE internal dbase error
>
> - LOGOUT
>
> * BYE
>
> - OK LOGOUT completed
>
> read:errno=0
>
> [user@linuxclient tmp]$
>
> Above I try to create the mailbox "Lists/swedishbricks/2018" which is actually where I'm trying to get. As a basic test I also try to create the mailbox "DELETEME" which also fails.
>
> Thanks,
>
> Peter
>
> -------------------------
>
> UT Southwestern
>
> Medical Center
>
> The future of medicine, today.
>
> _______________________________________________
> DBmail mailing list
> DBmail@dbmail.org
> http://lists.nfg.nl/mailman/listinfo/dbmail
Re: Problems creating Mailboxes [ In reply to ]
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

> Hi.
>
> which DB are you using?
>
> also which auth? SQL, LDAP,.. ?
>
> do you have the logging level turned up? are there any other errors as
> well?
>
> Regards


________________________________

UT Southwestern


Medical Center



The future of medicine, today.


_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://lists.nfg.nl/mailman/listinfo/dbmail
Re: Problems creating Mailboxes [ In reply to ]
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