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.
This commit is contained in:
Christoph Haas 2025-08-24 16:33:00 +02:00
parent 28edb36704
commit 6de9d4f6c7
5 changed files with 10 additions and 10 deletions

View file

@ -381,7 +381,7 @@
<mxCell id="gQG6ldMYRfHswNwDJcwK-158" value="MariaDB&lt;div&gt;database&lt;/div&gt;" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=16;" parent="1" vertex="1">
<mxGeometry x="570" y="8730" width="150" height="50" as="geometry" />
</mxCell>
<mxCell id="gQG6ldMYRfHswNwDJcwK-159" value="Yes, I found it in my virtual_mailboxes table" style="whiteSpace=wrap;html=1;shape=mxgraph.basic.roundRectCallout;dx=30;dy=15;size=5;boundedLbl=1;fontFamily=Helvetica;fontSize=16;labelBackgroundColor=none;flipV=0;fillColor=#fff2cc;strokeColor=#d6b656;flipH=1;" parent="1" vertex="1">
<mxCell id="gQG6ldMYRfHswNwDJcwK-159" value="Yes, I found it in my virtual_users table" style="whiteSpace=wrap;html=1;shape=mxgraph.basic.roundRectCallout;dx=30;dy=15;size=5;boundedLbl=1;fontFamily=Helvetica;fontSize=16;labelBackgroundColor=none;flipV=0;fillColor=#fff2cc;strokeColor=#d6b656;flipH=1;" parent="1" vertex="1">
<mxGeometry x="440" y="8660" width="180" height="80" as="geometry" />
</mxCell>
<mxCell id="gQG6ldMYRfHswNwDJcwK-160" value="17" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;" parent="1" vertex="1">

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Before After
Before After

View file

@ -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

View file

@ -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.
</Aside>
### 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,

View file

@ -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