diff --git a/public/big-picture-receive/17.svg b/public/big-picture-receive/17.svg index 11de097..eba3e91 100644 --- a/public/big-picture-receive/17.svg +++ b/public/big-picture-receive/17.svg @@ -1,3 +1,3 @@ -
Postfix
mail server
Postfix...
Other
mail server
Other...
MariaDB
database
MariaDB...
Yes, I found it in my virtual_users table
Yes, I found it in my...
\ No newline at end of file +
Postfix
mail server
Postfix...
Other
mail server
Other...
MariaDB
database
MariaDB...
Yes, I found it in my virtual_mailboxes table
Yes, I found it in my...
\ No newline at end of file diff --git a/src/content/docs/ispmail-trixie/110-whats-new.mdx b/src/content/docs/ispmail-trixie/110-whats-new.mdx index b5b0d30..640f314 100644 --- a/src/content/docs/ispmail-trixie/110-whats-new.mdx +++ b/src/content/docs/ispmail-trixie/110-whats-new.mdx @@ -29,6 +29,7 @@ organisation. So I replaced resource-hungry components by more lightweight softw of RAM wasted for this little amount of data we need to store. So this guide uses _SQLite_ instead. - rsyslogd was a classic choice to write log files like /var/log/mail.log. As Debian is using _systemd_ we no longer need rsyslogd and logrotate. The logs can be read using _journalctl_ instead. +- The MariaDB table `virtual_users` is renamed to `virtual_mailboxes` because it resembles how Postfix calls them. # Version changes diff --git a/src/content/docs/ispmail-trixie/150-virtual-domains.md b/src/content/docs/ispmail-trixie/150-virtual-domains.md index f0095ac..b047171 100644 --- a/src/content/docs/ispmail-trixie/150-virtual-domains.md +++ b/src/content/docs/ispmail-trixie/150-virtual-domains.md @@ -10,7 +10,7 @@ Your mail server will have one fully qualified domain name — for example, `pos domain is `example.com`. If someone visits `https://example.com/`, they might be greeted by the Roundcube webmail login page. -But your server doesn’t have to handle only one domain. You might have users like: +But your server doesn’t have to handle only one domain. You might have mailboxes like: - `jack@example.com` - `lucy@example.com` @@ -21,8 +21,8 @@ These are three different domains, and your server can handle them all. This is what _virtual domains_ are for. You give your mail server a list of domains and email addresses and it will receive emails for them. Your users will also have passwords that they need to type in to retrieve their emails. You can -even set up mailing lists that take messages sent to one address and forward them to several users at once. +even set up mailing lists that take messages sent to one address and forward them to several mailboxes at once. To make all this work, we’ll store the configuration in a small MariaDB database. Postfix, Dovecot, and Roundcube will -all read from this database to know which domains exist, which users they have, and where each email should go. You will -create that simple database on the next page. +all read from this database to know which domains exist, which mailboxes they have, and where each email should go. You +will create that simple database on the next page. diff --git a/src/content/docs/ispmail-trixie/155-database.mdx b/src/content/docs/ispmail-trixie/155-database.mdx index 54944c6..fac2a61 100644 --- a/src/content/docs/ispmail-trixie/155-database.mdx +++ b/src/content/docs/ispmail-trixie/155-database.mdx @@ -82,7 +82,7 @@ Debian Trixie, we’ve disabled chroot mode for Postfix, which means we can now By now you have an empty database and two user accounts to access it. Now you need three tables: - virtual_domains -- virtual_users +- virtual_aliases - virtual_mailboxes Let's create the entire database schema in one go: @@ -98,7 +98,16 @@ CREATE TABLE IF NOT EXISTS `virtual_domains` ( PRIMARY KEY (`id`) ); -CREATE TABLE IF NOT EXISTS `virtual_users` ( +CREATE TABLE IF NOT EXISTS `virtual_aliases` ( + `id` int(11) NOT NULL auto_increment, + `domain_id` int(11) NOT NULL, + `source` varchar(100) NOT NULL, + `destination` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS `virtual_mailboxes` ( `id` int(11) NOT NULL auto_increment, `domain_id` int(11) NOT NULL, `email` varchar(100) NOT NULL, @@ -108,15 +117,6 @@ CREATE TABLE IF NOT EXISTS `virtual_users` ( UNIQUE KEY `email` (`email`), FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE ); - -CREATE TABLE IF NOT EXISTS `virtual_aliases` ( - `id` int(11) NOT NULL auto_increment, - `domain_id` int(11) NOT NULL, - `source` varchar(100) NOT NULL, - `destination` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE -); ``` {/* */} @@ -138,13 +138,13 @@ represents a domain. -### virtual_users +### virtual_mailboxes The second table contains information about your users. Each mail account requires one row in this table. - **id**: A unique number identifying each row. It is set automatically. - **domain_id**: A [reference](https://en.wikipedia.org/wiki/Foreign_key) to the domain in the `virtual_domains` table. - So each domain can have many virtual users. + So each domain can have many mailboxes. - **email**: The email address of the mailbox. - **password**: The hashed password of the mail account. It is prepended by the [password scheme](https://doc.dovecot.org/main/core/config/auth/schemes.html). By default it is `{BLF-CRYPT}` also @@ -211,7 +211,7 @@ REPLACE INTO virtual_domains (id, name) VALUES (10,'example.org'); -REPLACE INTO virtual_users +REPLACE INTO virtual_mailboxes (id, domain_id, password, email) VALUES ( 1,