quotes fixed

This commit is contained in:
Christoph Haas 2025-09-28 20:31:19 +02:00
parent 0af40d1506
commit c23f57e9bb

View file

@ -18,7 +18,7 @@ The following sections explain the changes and SQL queries you can use for commo
### Create a new mail domain
Insert a new row into the virtual_domains table and set the “name” to the name of the new domain. (Do not forget to set
Insert a new row into the virtual_domains table and set the `name` to the name of the new domain. (Do not forget to set
up SPF and DKIM.)
```sql
@ -27,7 +27,7 @@ INSERT INTO virtual_domains (name) VALUES ("example.org");
### Delete a mail domain
Delete the row from the virtual_domains table that has the right “name”. All aliases and users will automatically be
Delete the row from the virtual_domains table that has the right `name`. All aliases and users will automatically be
deleted, too. However the mailboxes will stay on disk at /var/vmail/… and you need to delete them manually.
```sql
@ -36,10 +36,10 @@ DELETE FROM virtual_domains where name='example.org';
### Create a mail user
Find out the “id” of the right domain from the virtual_domains table. The insert a new row into the virtual_users table.
Set the domain_id to the value you just looked up in the virtual_domains table. Set the “email” field to the complete
email address of the new user. Create a new password in a shell using the “dovecot pw -s BLF-CRYPT” command and insert
the result into the “password” field.
Find out the `id` of the right domain from the virtual_domains table. The insert a new row into the virtual_users table.
Set the domain_id to the value you just looked up in the virtual_domains table. Set the `email` field to the complete
email address of the new user. Create a new password in a shell using the `dovecot pw -s BLF-CRYPT` command and insert
the result into the `password` field.
```sql
INSERT INTO virtual_users (domain_id, email, password) VALUES (SELECT id FROM virtual_domains WHERE name='example.org'), 'john@example.org','{BLF-CRYPT}$2y$05$.We…';
@ -47,8 +47,8 @@ INSERT INTO virtual_users (domain_id, email, password) VALUES (SELECT id FROM vi
### Change the password of a user
Find the row in the virtual_users table by looking for the right “email” field. Create a new password in a shell using
the “dovecot pw -s BLF-CRYPT” command and insert the result into the “password” field.
Find the row in the virtual_users table by looking for the right `email` field. Create a new password in a shell using
the `dovecot pw -s BLF-CRYPT` command and insert the result into the `password` field.
```sql
UPDATE virtual_users SET password='{BLF-CRYPT}$2y$05$.We…' WHERE email='email@address';
@ -56,7 +56,7 @@ UPDATE virtual_users SET password='{BLF-CRYPT}$2y$05$.We…' WHERE email='email@
### Delete a mail user
Find the row in the virtual_users table by looking for the right “email” field and delete it. The mailbox will stay on
Find the row in the virtual_users table by looking for the right `email` field and delete it. The mailbox will stay on
disk at /var/vmail/… and you need to delete it manually
```sql
@ -66,9 +66,9 @@ DELETE FROM virtual_users WHERE email='john@example.org';
### Create a mail forwarding
You can forward emails from one (source) email to other addresses (destinations) even outside of your mail
server. Find out the “id” of the right domain (the part after the “@” of the source email address) from the
server. Find out the `id` of the right domain (the part after the `@` of the source email address) from the
virtual_domains table. Create a new row in the virtual_aliases table for each destination (if you have multiple
destination addresses). Set the “source” field to the complete source email address. And set the “destination” field to
destination addresses). Set the `source` field to the complete source email address. And set the `destination` field to
the respective complete destination email address.
```sql
@ -77,8 +77,8 @@ INSERT INTO virtual_aliases (domain_id, source, destination) VALUES ( (SELECT i
### Delete a mail forwarding
Find all rows in the virtual_aliases table by looking for the right “source” email address. Remove all rows that you
lead to “destination” addresses you dont want to forward email to.
Find all rows in the virtual_aliases table by looking for the right `source` email address. Remove all rows that you
lead to `destination` addresses you dont want to forward email to.
```sql
DELETE FROM virtual_aliases WHERE source='melissa@example.org';