Optimized Mailu docs

This commit is contained in:
2025-08-18 00:14:58 +02:00
parent d1cd87c843
commit 6443771d93
5 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
# Administration 🕵️‍♂️
## Database Access 📂
To access the database, use the following command:
```bash
docker-compose exec -it database mysql -u root -D mailu -p
```
## Container Access 🖥️
To access the front container, use this command:
```bash
docker-compose exec -it front /bin/bash
```
## Restarting Services 🔄
To restart all services, use the following command:
```bash
docker-compose restart
```
## Resending Queued Mails ✉️
To resend queued mails, use this command:
```bash
docker-compose exec -it smtp postqueue -f
```
# Updates 🔄
For instructions on updating your Mailu setup, follow the official [Mailu maintenance guide](https://mailu.io/master/maintain.html).
# Queue Management 📬
To manage the Postfix email queue in Mailu, you can use the following commands:
- **Display the email queue**:
```bash
docker compose exec -it smtp postqueue -p
```
- **Delete all emails in the queue**:
```bash
docker compose exec -it smtp postsuper -d ALL
```

View File

@@ -0,0 +1,62 @@
# Installation ⚙️
## Fetchmail Issues 📨
Fetchmail might not work properly with large amounts of data. For more information, refer to this [issue](https://github.com/Mailu/Mailu/issues/1719).
## Deactivating Fetchmail ❌
Before uninstalling Fetchmail, ensure you remove all fetched accounts from the administration panel.
## Fetchmail Security Concerns 🔐
There are known security concerns with Fetchmail as stated in the [German Wikipedia](https://de.wikipedia.org/wiki/Fetchmail). If you require Fetchmail functions in the future, consider creating a Docker container for [Getmail](https://en.wikipedia.org/wiki/Getmail) as it is considered more secure.
## Fetchmail Workaround 🔄
If you need to receive emails from another account, follow these steps:
1. Redirect your emails to your new email account.
2. Export all data from your original account.
3. Import all data to your new account.
## Port Management 🌐
Check for any port conflicts and manually change the conflicting ports if necessary. Use the following command to verify:
```bash
netstat -tulpn
```
## Admin Account Creation 👤
To use Mailu, create the primary administrator user account, `admin@{{hostname}}`, using the command below. Replace `PASSWORD` with your preferred password:
```bash
docker-compose -p mailu exec admin flask mailu admin {{admin}} {{hostname}} PASSWORD
```
## CLI User Management 🛠️
For managing users, follow the instructions in the official [Mailu CLI documentation](https://mailu.io/master/cli.html).
## Starting the Server ▶️
To start the server, use the following command:
```bash
docker-compose -p mailu up -d
```
## OIDC Support 🔐
This role now supports OpenID Connect (OIDC) authentication with [Mailu-OIDC](https://github.com/heviat/Mailu-OIDC)! 🎉
To enable OIDC authentication, simply set the following variable:
```yaml
oidc:
enabled: true
```
For more details, check out the [Mailu-OIDC repository](https://github.com/heviat/Mailu-OIDC/tree/2024.06).

View File

@@ -0,0 +1,22 @@
# Spam Issues 🚨
## Inspect 🔎
Use the following tools to monitor your domain and email deliverability:
- [Google Postmaster](https://postmaster.google.com/) - Analyzes deliverability and spam issues for Gmail.
- [Yahoo Postmaster](https://postmaster.yahooinc.com) - Provides insights and delivery reports for Yahoo.
- [MXToolbox](https://mxtoolbox.com)
## Blacklist Check 🚫
If your domain is blacklisted, you can check the status with these services and take steps to remove your domain if necessary:
- [Spamhaus](https://check.spamhaus.org/)
- [Barracuda](https://www.barracudacentral.org/lookups)
## Cloudmark Reset Request 🔄
If your IP or domain is flagged by Cloudmark, you can submit a **reset request**:
- [Cloudmark Reset](https://csi.cloudmark.com/en/reset/)

View File

@@ -0,0 +1,6 @@
# Test Server Instance
Use the following tools to test your server instance:
- [SSL-Tools Mailserver Test](https://de.ssl-tools.net/mailservers/)
- [TestEmail.de](http://testemail.de/)

View File

@@ -0,0 +1,108 @@
# User Administration
## Promoting an OIDC User to Admin 🧑‍💼
If your administrator logs in via OpenID Connect (OIDC) and you don't want to create a separate local user, you can promote the existing OIDC-authenticated user to a global admin directly in the Mailu database using the CLI.
Follow these steps:
1. Enter the Mailu `admin` container shell:
```bash
docker exec -it mailu-admin-1 flask shell
```
2. Inside the interactive shell, run the following commands:
```python
from mailu import models, db
user = models.User.query.filter_by(email='admin@example.com').first()
user.global_admin = True
db.session.commit()
```
Replace `admin@example.com` with the OIDC email address used to log in.
3. Exit the shell:
```python
exit()
```
Your OIDC-authenticated user is now a full **global admin** and has access to all administrative functions in the Mailu interface.
> 💡 Tip: This method is useful when you're using federated login and want to avoid managing separate local admin credentials.
Klar! Hier ist die Anleitung zur Änderung der primären Domain eines Mailu-Benutzers, speziell für **MariaDB** als Datenbank-Backend, auf **Englisch** und im gleichen Stil wie deine Doku:
---
## Changing the Primary Domain of a Mailu Account (MariaDB) 🌐
Mailu links user accounts to specific domains, so changing a user's primary domain cannot be done via the admin interface. You need to update it manually via the database.
> ⚠️ **Warning:** Always back up your database before performing manual operations.
### Steps for MariaDB:
1. Connect to the Mailu MariaDB container:
```bash
docker compose exec -it database mariadb -u mailu -p
```
Enter the password when prompted (you can find it in your `docker-compose.yml` or `.env` file).
2. Select the Mailu database (usually named `mailu`):
```sql
USE mailu;
```
3. Update the user's domain and email:
```sql
UPDATE user SET email='newname@newdomain.com', domain_name='newdomain.com' WHERE email='oldname@olddomain.com';
```
If needed, also update the local part (username):
```sql
UPDATE user SET localpart='newname' WHERE email='newname@newdomain.com';
```
4. If the new domain does not exist yet, insert it into the `domain` table:
```sql
INSERT INTO domain (name, max_users, max_aliases, max_quota_bytes, comment, enabled)
VALUES ('newdomain.com', 100, 100, 10737418240, 'New domain', true);
```
5. If the user had aliases, update the `alias` table accordingly.
---
### Alternative: Recreate the User
If you prefer not to modify the database manually:
- Delete the old user via the admin UI
- Create a new user under the desired domain
- Migrate emails using IMAP tools (e.g. `imapsync`)
---
### Update DNS and Mailu Configuration
Ensure that the new domain is correctly set up:
- Add it to `HOSTNAMES` in your `docker-compose.yml`
- Set up proper DNS records (MX, SPF, DKIM, DMARC)
- If using Let's Encrypt (`TLS_FLAVOR=cert`), make sure the domain is included in `LETSENCRYPT_HOSTS`
> 💡 **Tip:** Mailu must be aware of the domain both in its configuration and the database for mail routing and certificate issuance to work correctly.
---
Wenn du willst, kann ich dir das gleich in eine fertige Markdown-Datei oder ein Doku-Format einfügen.