Managing users

Users are at the core of DBMail, they receive email and manage their inbox. This section shows how users are managed with examples.

Note that this is administrators managing user accounts. Users can manage their email using any IMAP mail client such as Thunderbird, Squirrelmail or Outlook.

Meet three typical users, Frodo an ordinary user, Gandalf who has multiple personas, and Gollum who moves from one organisation to another.

Key concepts:

  • userid - An account login name / user identification users use to identify themselves to an imap server, this is usually the same as their smtp account;
  • alias - One or more email addresses used to send email to a user;
  • forward - An email address to forward email when a user moves on to another organisation.

There are two authentication mechanisms in DBMail: SQL and LDAP/Active Directory. DBMail needs to know who you are, what email addresses you are using and if you have moved on, what address to forward emails.

Frodo

Meet Frodo our example of an ordinary user, he has a username of frodo and has a public email address of frodo@example.com. Frodo has an alias of frodo@example.com. When someone sends an email to frodo@example.com the MTA send the email to DBMail and it arrives in Frodo's inbox.

To create user Frodo in DBMail use the following:

dbmail-users --add-user frodo --password Breakfast --pw-type sha256
dbmail-users --change-user frodo --add-alias "frodo@example.com"

Or you can combine the two:

dbmail-users --add-user frodo --password Breakfast --pw-type sha256 --add-alias frodo@example.com
Adding user frodo with password type sha256,0 bytes mailbox limit and clientid 0...
Ok, user added id [1002]
Adding INBOX for new user... ok.
[frodo@example.com]
Done
frodo:x:1002:0:0.00:0.00:frodo@example.com

You can check that Frodo has been created:

dbmail-users --config dbmail.conf --list-user frodo
Listing information for user [frodo]...
frodo:x:1002:0:0.00:0.00:frodo@example.com

Gandalf

Meet Gandalf, he has a username of gandalf and because he has many roles he has two email addresses gandalf@example.com and wizard@example.com.

dbmail-users --add-user gandalf --password Völuspá --pw-type sha256 --add-alias "gandalf@example.com,wizard@example.com"

You can check Gandalf has been created:

dbmail-users --config dbmail.conf --list-user gandalf 
Listing information for user [gandalf]...
gandalf:x:1003:0:0.00:0.00:gandalf@example.com,wizard@example.com

Gollum

Meet Gollum. He's loyal to whoever he works for, but frequently moved on and wants his email to be forwarded to his new email address.

Create Gollum:

dbmail-users --add-user gollum --password shinyring --pw-type sha256 --add-alias gollum@example.com

Adding user gollum with password type sha256,0 bytes mailbox limit and clientid 0... 
Ok, user added id [1004]
Adding INBOX for new user... ok.
[gollum@example.com]
Done
gollum:x:1004:0:0.00:0.00:gollum@example.com

When he moved on to example.net he wants all his email forwarded to gollum@example.net:

dbmail-users --forward gollum@example.com --add-forward gollum@example.net
Creating an external forwarding address for [gollum@example.com]...
[gollum@example.net]
Done

You can check users and their deliveries as follows:

dbmail-users --list-user gollum@example.com
Listing information for user [gollum@example.com]...
forward [gollum@example.com] to [gollum@example.org,gollum@example.net]
deliver [gollum@example.com] to [gollum]