Users

Users can be easily managed within Account’s admin panel. Depending on your permissions you may or may not have access to a variety of options.

A screen of part of the admin panel. It's showing the main header nav, as well as the Authentication group which contains Users. An add and change link appear beside it.

User list

Selecting the User model from the admin panel’s main page will display a list of all users in the middle of the page as well as a search bar. To the left of the page you’ll see the standard list of Apps and their Models, and to the right of the page you’ll see the Add User + button at the top, and some basic filter options below that.

A screenshot showing an example of the description above.

From this page you can click on a user’s UUID field (shown in highlighted in blue) to view their profile information in more depth. You can also select one or many user’s to perform actions on.

There are currently four available actions:

  • Delete selected user(s).

  • Fix Broken Stalwart Account

  • Sync plan information to Keycloak

  • Manually activate subscription features

If you spot an option that’s not documented or has an issue number, please ask a developer before using.

Deactivating Users

Two independent switches control what a user can do.

Switch

Where it is changed

Effect

Active (Permissions, Change user page)

Accounts admin

Staff kill switch. Unticking disables the Keycloak user and signs them out everywhere, locks every service below, and signs them out of Accounts.

Subscription status

Paddle

Billing lever. A subscription that is active or past_due entitles the user to the services; paused or canceled locks the services but the user can still sign in to Accounts, for example to fix payment.

Services locked by either switch:

  • Stalwart: the mail account loses the authenticate permission. Existing app passwords stop working and nothing can sign in or send, but incoming mail keeps arriving in the mailbox and is available again once access is restored.

Deactivated at under Important dates records when Active was last unticked. Ticking Active again clears the timestamp and restores Keycloak; the services come back only if the subscription still entitles the user.

Changing Active never changes the user’s Paddle subscription. To stop billing, pause or cancel in Paddle.

If Keycloak or Stalwart could not be updated you’ll see an error at the top of the page. The user is still marked inactive in Accounts; to retry, tick Active, save, untick it and save again, or ask a developer.

Why does mail keep arriving while an account is deactivated?

A deactivated account may be activated again, so its address is not dead yet. That rules out both ways of refusing mail. We can’t accept the mail and bounce it: most inbound mail is spam with forged sender addresses, so the bounces would go to people who never sent anything, and that backscatter would damage our sending reputation. We can’t reject it during the SMTP session either. A permanent rejection tells the sending server the address does not exist, so legitimate senders see “user unknown” for a real person and automated systems stop sending for good; a user who is unlocked later would silently lose those subscriptions and notifications. A temporary rejection only defers the problem, since sending servers retry for a few days and then give up the same way. Once the account is fully removed, the address really is gone and rejecting at SMTP time is correct: the sending server handles the failure, so we never emit a bounce ourselves.

Deleting Users

Deleting a user will remove their ability to login and access Thunderbird Pro Services, as well as delete their data from Stalwart (our mail server), Keycloak (our authentication server).

Their subscription will still remain, and will have to be cancelled manually if not already done so. We plan on hooking up an automatic cancellation request to Paddle in the near future.

Upon selecting this action you’ll be shown a confirmation screen.

A delete confirmation screen, showing the summary of users that would be deleted and their thundermail addresses.

Fix Broken Stalwart Account

This action will run through the following edge-cases that may arise.

The steps are as follows:

  • Does the user have a Stalwart account (mailbox)

  • Does that account have a thundermail address attached to it

If the user does not have a Stalwart account then one is created on the spot and their email is automatically attached. If the user does have a Stalwart account but does not have their email attached, then their email will be attached.

If the fix creates or fixes something successfully you’ll see a message similar to: “Create/Fixed x Stalwart email addresses/accounts.”

If there’s an error you’ll see “Failed to fix x Stalwart accounts.” Please follow up with an engineer on steps to remedy this.

Finally, if there is nothing to fix then you’ll see a “Nothing to fix!” message.

Sync information to Keycloak

This action copies the current plan information to their Keycloak user profile. This allows other services to access this information without having to ask Accounts.

It currently syncs the following information:

  • is_subscribed: Whether the user is subscribed to a plan.

  • mail_address_count: The amount of email addresses their plan allows them to create.

  • mail_domain_count: The amount of custom domains their plan allows them to attach to their account.

  • mail_storage_bytes: The amount of mail storage (in bytes) their plan allows them to use.

  • send_storage_bytes: The amount of Send storage (in bytes) their plan allows them to use.

This should automatically update if the user’s plan changes, or if the plan itself changes. There may be a delay between changing plan information and the information updating in Keycloak.

This is safe to re-run.

Manually activate subscription features

This action will run the same code that occurs when a user subscribes for the first time, but only if they already have a plan attached. It will create a Stalwart account, if one already exists it will update their Stalwart account’s quota with the information on their plan.

This is safe to re-run, but generally not advised unless you’re manually fixing up a bungled subscription.

Adding Users

When you land on the Add user page you’ll see that it only requires 3 fields:

  • Thundermail Address: username@thundermail.com or username@stage-thundermail.com depending on environment.

  • Recovery Email Address: The email that will receive the Update password and other service emails.

  • Timezone: In tz data format. An exhaustive list is available here.

Additionally, the first and last names are optional and are part of the default database schema, and keycloak’s user profile. These fields are intended for display purposes only, and won’t be used for billing. For display purposes they will be concatenated together with a space between.

Finally if you need to login to this account you should definitely check Send "Reset Password" email. This will send a reset password email from Keycloak so the user may setup their credentials. If you fail to do this, you will need to login to the Keycloak admin panel and send it via the user’s credentials tab.

This form does not check against the reserved word list, and therefore you can create users with thundermail addresses that they would not be allowed to create themselves.

A screenshot of the Add user page. Showing a few required fields mentioned above.

There are three action buttons on this form. The standard SAVE button will bring you back to the user list. While Save and add another will bring you back to this screen, and finally Save and continue editing will bring you to the change user screen.

If the data you entered contains invalid data (e.g. blank required field, or an incorrect timezone) you will be shown an error.

A screenshot of the required fields highlighted in a red outline with different errors.

If there are no issues with the data, you’ll be brought to one of the three places you’ve selected and that user will be created on Keycloak. If the Send "Reset Password" email was checked they will receive an email via Keycloak to reset / setup their credentials.

Changing Users

When you land on the Change user page you’ll see their Thundermail address at the top left, along with their data laid out in a similar manner to the Add user page. Here you can edit some of the fields and those changes will propagate to Keycloak. Some of these fields include the previous required fields, as well as some new ones like user permissions.

Unless you’re a super admin you probably won’t have access to many permission related actions, but here is where you can assign users to permission groups so they can perform various actions on the admin panel.

Like the Add user page any invalid data will send you back to the form with error messages, and any successful changes will propagate to Keycloak. If you’ve changed their primary email address or first or last name these changes will also propagate to Stalwart.

It’s not recommended to change the Thundermail address at this time. If you do update the Thundermail address you will need to make a matching update on the User’s Account’s primary Email object.

This is not an ideal flow, but it’s needed for now.

A screenshot of part of the change user form.

History

On some pages you’ll see a button called History. Here you can see an audit log of who performed an action, what that action was (high level), and when that action was performed. An even higher-level version of this page for all changes is located on the main admin panel titled as Recent Actions.

A screenshot of the history page. It shows the date and time, user who performed the action, and the action that was performed.