Author: Kevin Baker
Below are SQL queries that can be used by developers to build new admin interfaces to DBMail. I'm using these queries to start my Java API to administrate DBMail. Right now I just have DbmailUtil.addUser(User user). I'll post as soon as I have it a bit more complete…
INSERT INTO dbmail_users (userid,passwd,client_idnr,maxmail_size,encryption_type,last_login) VALUES ('[userid]','[password]',0,'QUOTA IN BYTES','',CURRENT_TIMESTAMP)
[user_idnr] = SELECT user_idnr FROM dbmail_users WHERE userid='[userid]'
INSERT INTO dbmail_mailboxes (name, owner_idnr,seen_flag, answered_flag, deleted_flag,flagged_flag, recent_flag, draft_flag, permission) VALUES ('INBOX', [user_idnr], 1, 1, 1, 1, 1, 1, 2)
DBMail (>=2.1.7) automatically created the mailbox on need. So no need to add it manually.
INSERT INTO dbmail_aliases (alias,deliver_to,client_idnr) VALUES ('[user email address]',[user_idnr],0)
Added by: Ruslan Yalyshev
INSERT INTO dbmail_aliases (alias,deliver_to,client_idnr) VALUES ('[user email address]','[forward email address]',0) [[http://writing-help.org/|Writing help]]