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:
parent
28edb36704
commit
6de9d4f6c7
5 changed files with 10 additions and 10 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue