From 6de9d4f6c7cd4633ab293f548684af753e7eec37 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 24 Aug 2025 16:33:00 +0200 Subject: [PATCH] revert the renaming of virtual_users to virtual_mailboxes It does not really add much value and makes things more complicated during migration. Plus the table contains passwords so it's more than just the mailboxes. --- drawio/big-picture.drawio | 2 +- public/big-picture-receive/17.svg | 3 ++- src/content/docs/ispmail-trixie/110-whats-new.mdx | 1 - src/content/docs/ispmail-trixie/155-database.mdx | 8 ++++---- .../docs/ispmail-trixie/160-receive-emails-postfix.mdx | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drawio/big-picture.drawio b/drawio/big-picture.drawio index a5dd2f1..e73dbe9 100644 --- a/drawio/big-picture.drawio +++ b/drawio/big-picture.drawio @@ -381,7 +381,7 @@ - + diff --git a/public/big-picture-receive/17.svg b/public/big-picture-receive/17.svg index eba3e91..886c091 100644 --- a/public/big-picture-receive/17.svg +++ b/public/big-picture-receive/17.svg @@ -1,3 +1,4 @@ + -
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 +
Postfix
mail server
Other
mailĀ server
MariaDB
database
Yes, I found it in my virtual_users table
\ 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 640f314..b5b0d30 100644 --- a/src/content/docs/ispmail-trixie/110-whats-new.mdx +++ b/src/content/docs/ispmail-trixie/110-whats-new.mdx @@ -29,7 +29,6 @@ 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/155-database.mdx b/src/content/docs/ispmail-trixie/155-database.mdx index fac2a61..00890d0 100644 --- a/src/content/docs/ispmail-trixie/155-database.mdx +++ b/src/content/docs/ispmail-trixie/155-database.mdx @@ -83,7 +83,7 @@ By now you have an empty database and two user accounts to access it. Now you ne - virtual_domains - virtual_aliases -- virtual_mailboxes +- virtual_users Let's create the entire database schema in one go: @@ -107,7 +107,7 @@ CREATE TABLE IF NOT EXISTS `virtual_aliases` ( FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE ); -CREATE TABLE IF NOT EXISTS `virtual_mailboxes` ( +CREATE TABLE IF NOT EXISTS `virtual_users` ( `id` int(11) NOT NULL auto_increment, `domain_id` int(11) NOT NULL, `email` varchar(100) NOT NULL, @@ -138,7 +138,7 @@ represents a domain. -### virtual_mailboxes +### virtual_users The second table contains information about your users. Each mail account requires one row in this table. @@ -211,7 +211,7 @@ REPLACE INTO virtual_domains (id, name) VALUES (10,'example.org'); -REPLACE INTO virtual_mailboxes +REPLACE INTO virtual_users (id, domain_id, password, email) VALUES ( 1, diff --git a/src/content/docs/ispmail-trixie/160-receive-emails-postfix.mdx b/src/content/docs/ispmail-trixie/160-receive-emails-postfix.mdx index 10e8595..cbb2215 100644 --- a/src/content/docs/ispmail-trixie/160-receive-emails-postfix.mdx +++ b/src/content/docs/ispmail-trixie/160-receive-emails-postfix.mdx @@ -198,12 +198,12 @@ user = mailserver password = SECOND-PASSWORD-HERE hosts = 127.0.0.1 dbname = mailserver -query = SELECT 1 FROM virtual_mailboxes WHERE email='%s' +query = SELECT 1 FROM virtual_users WHERE email='%s' EOF ``` -Just the same story as with virtual domains. The database returns `1` if there is a `virtual_mailboxes` record matching -that specific email address. +Just the same story as with virtual domains. The database returns `1` if there is a `virtual_users` record matching that +specific email address. Actually the _answer_ is usually not `1` but the path to the mailbox on disk. But that applies only if Postfix would be saving the email to disk on its own. In our setup the email will be passed on to Dovecot in a later step. Dovecot will