mjl- / mox

modern full-featured open source secure mail server for low-maintenance self-hosted email
https://www.xmox.nl
MIT License
3.38k stars 89 forks source link

What are an account and local part? #132

Closed ally9335 closed 4 months ago

ally9335 commented 5 months ago

image

Is an account is a way to categorise addresses and nothing more? Is the local part an actual email address? Is there a way to rename an account?

I've noticied, after an account or email address has been deleted, it'll remain in config/ domains.conf nonetheless

mjl- commented 5 months ago

Is an account is a way to categorise addresses and nothing more?

You login for an account. So there is 1 password per account. An account can have multiple email addresses, so incoming messages for multiple addresses can be delivered to a single account. In fact, there is no "primary address" for an account, if there are multiple addresses, they are all equal (and when you login with username/password, you can use any email address configured for the account to login). The account is also used for the on-disk storage: in data/accounts/<accountname>/.... The account doesn't have the form of an email address: Because email addresses can be added/removed, an account that looks like an email address may not even be about that email address after changes have been made. For the initial account (created during quickstart), the localpart (part before "@") of the email address passed on the command-line is used.

I've started to think/realize this is not ideal. I think the first step is adding a bit more documentation to the admin pages too, so users are more likely to understand what's going on.

Is the local part an actual email address?

The screenshot is from the "domain page". This "add address" part, is for adding an address to the domain. That's why you only have to fill in the localpart. I think this can be made more obvious by showing a text (not input) @<domain> after the input field for localpart. I'm also not sure if it's commonly known that the part before the "@" is called the localpart.

Is there a way to rename an account?

Not through the admin web interface. The best way to do it (at the moment), is to edit the domains.conf configuration file (renaming the account), and moving the directory data/accounts/<oldaccountname> to data/accounts/<newaccountname>. It's best to shut mox down during that time, to prevent problems with a small window of time where mox tries to access files under the old account name.

I've noticied, after an account or email address has been deleted, it'll remain in config/domains.conf nonetheless

Oh, that is surprising. I tested just now and couldn't reproduce that. I believe the files for the account do stay in data/accounts/, but the config files should be updated automatically. Do you not get error messages when trying remove an address or account? While in the admin web interface, or in the logging.