computer-playbook/roles/docker-mailu
2024-12-17 15:18:27 +01:00
..
handlers Added .cymais.service suffix to make cymais files more visible 2024-01-10 11:18:38 +01:00
meta Implemented common docker routine 2024-01-03 20:17:55 +01:00
tasks Restructured code and matrix rol 2024-01-19 15:12:18 +01:00
templates Added correct antivirus 2024-12-17 15:18:27 +01:00
vars Added missing database type 2024-01-04 09:19:41 +01:00
README.md Updated Mailu README.md 2024-11-07 18:46:58 -03:00

Mailu Server Docker Role

This guide provides instructions for setting up, operating, and maintaining the Mailu server docker role.

Table of Contents

Setup

Fetchmail Issues

Fetchmail might not work properly with large amounts of data. For more information, refer to this issue.

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. If you require Fetchmail functions in the future, consider creating a Docker container for 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.

Data Deletion

To delete all volumes and data, execute the following command with caution:

rm -vr /etc/mailu/; docker volume rm $(docker volume ls -q | grep mailu_)

Port Management

Check for any port conflicts and manually change the conflicting ports if necessary. Use the following command to verify:

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:

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.

Starting the Server

To start the server, use the following command:

docker-compose -p mailu up -d

Debugging

Database Access

To access the database, use the following command:

docker-compose exec -it database mysql -u root -D mailu -p

Container Access

To access the front container, use this command:

docker-compose exec -it front /bin/bash

Restarting Services

To restart all services, use the following command:

docker-compose restart 

Resending Queued Mails

To resend queued mails, use this command:

docker-compose exec -it smtp postqueue -f

Testing

Use the following tools for testing:

Updates

For instructions on updating your Mailu setup, follow the official Mailu maintenance guide.

Queue Management

To manage the Postfix email queue in Mailu, you can use the following commands:

  • Display the email queue: This command shows all queued emails.

    docker compose exec -it smtp postqueue -p
    
  • Delete all emails in the queue: To remove all queued emails permanently, use the command:

    docker compose exec -it smtp postsuper -d ALL
    

These commands can help control the email queue, especially for clearing out emails with delivery issues or delays.

Spam Issues

Inspect

Use the following tools to monitor your domain and email deliverability:

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 - One of the most widely used blacklists for spam.
  • Barracuda - Checks if your IP is on the Barracuda blacklist.

Cloudmark Reset Request

If your IP or domain is flagged by Cloudmark, you can submit a reset request to help restore deliverability:

To-Do

  • Implement two-factor authentication in Roundcube Webmail. More information can be found here.
  • Integrate Nextcloud 15 and newer with Mailu. Learn more about this here.
  • User authentication with Nextcloud. Find more information here.

References

For more information about this role, visit the GitHub repository.

This README.md was optimized with Chat-GPT