From c3f43cfd0e93fae9ab5e1efd1d3ed88e3ef3683f Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Wed, 20 Aug 2025 00:35:42 +0200 Subject: [PATCH] moving from sqlite to mariadb --- .../{155-sqlite.mdx => 155-database.mdx} | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) rename src/content/docs/ispmail-trixie/{155-sqlite.mdx => 155-database.mdx} (78%) diff --git a/src/content/docs/ispmail-trixie/155-sqlite.mdx b/src/content/docs/ispmail-trixie/155-database.mdx similarity index 78% rename from src/content/docs/ispmail-trixie/155-sqlite.mdx rename to src/content/docs/ispmail-trixie/155-database.mdx index fb55a09..407c4e4 100644 --- a/src/content/docs/ispmail-trixie/155-sqlite.mdx +++ b/src/content/docs/ispmail-trixie/155-database.mdx @@ -1,27 +1,20 @@ --- -title: SQLite Database +title: Database setup lastUpdated: 2025-08-14 -slug: ispmail-trixie/sqlite +slug: ispmail-trixie/database sidebar: order: 155 --- import { Aside } from "@astrojs/starlight/components"; -Your mail server must know which domains and email addresses it is responsible for, so it can reject spam sent to -non-existent users. That information will be put into an SQLite database file that will be located at -`/var/vmail/ispmail.sqlite`. - - +Your mail server must know which domains and email addresses it is responsible for, so it can reject emails sent to +non-existent users. That information will be put into a database. We are using MariaDB for that purpose. The database will contain three tables: -- virtual*domains: list of domains (\_name*) that your mail server is responsible for +- virtual*domains: list of domains (\_name*) that your mail server is responsible for. A domain can have many mailboxes + and many aliases. - virtual_users: list of email addresses that lead to mailboxes. We store the email address, a hashed/salted password and optionally a quota to limit the disk space usage. - virtual*aliases: list of email addresses (\_source*) that forward to other addresses (_destination_) @@ -76,6 +69,10 @@ Graphically it looks like: ![ISPmail database schema](images/sqlite-schema.png) + + Paste the following block to create some test data to play with: ```sql