This commit is contained in:
Bozhidar 2024-09-17 15:26:07 +03:00
parent fe7fd2d4b5
commit 382a38da60
3 changed files with 19 additions and 15 deletions

View file

@ -5,6 +5,7 @@ namespace Modules\Email\App\Providers;
use BladeUI\Icons\Factory;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use Modules\Email\App\Console\SetupDockerEmailServer;
class EmailServiceProvider extends ServiceProvider
{
@ -46,7 +47,9 @@ class EmailServiceProvider extends ServiceProvider
*/
protected function registerCommands(): void
{
// $this->commands([]);
$this->commands([
SetupDockerEmailServer::class
]);
}
/**

View file

@ -1,9 +1,9 @@
services:
mailserver:
image: ghcr.io/docker-mailserver/docker-mailserver:latest
container_name: mailserver
container_name: {{$containerName}}
# Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
hostname: mail.domain.ai
hostname: {{$hostName}}
ports:
- "25:25" # SMTP (explicit TLS => STARTTLS)
- "465:465" # ESMTP (implicit TLS)
@ -13,16 +13,17 @@ services:
- "110:110" # POP3
- "995:995" # POP3 (with TLS)
volumes:
- ./docker-data/dms/mail-data/:/var/mail/
- ./docker-data/dms/mail-state/:/var/mail-state/
- ./docker-data/dms/mail-logs/:/var/log/mail/
- ./docker-data/dms/config/:/tmp/docker-mailserver/
- {{$workPath}}/docker-data/dms/mail-data/:/var/mail/
- {{$workPath}}/docker-data/dms/mail-state/:/var/mail-state/
- {{$workPath}}/docker-data/dms/mail-logs/:/var/log/mail/
- {{$workPath}}/docker-data/dms/config/:/tmp/docker-mailserver/
- /etc/localtime:/etc/localtime:ro
- ./docker-data/acme-companion/certs/:/etc/letsencrypt/live/:ro
- {{$workPath}}/docker-data/acme-companion/certs/:/etc/letsencrypt/live/:ro
environment:
- SSL_TYPE=letsencrypt
- VIRTUAL_HOST=mail.vanesa.ai
- LETSENCRYPT_HOST=mail.vanesa.ai
- VIRTUAL_HOST={{$hostName}}
- LETSENCRYPT_HOST={{$hostName}}
- ENABLE_FAIL2BAN=0
- PERMIT_DOCKER=network
- ONE_DIR=1

View file

@ -19,11 +19,11 @@ ufw allow 25
ufw allow 587
ufw allow 465
ufw allow 993
docker exec -it xx setup config dkim
docker exec -ti xx setup email add xx@domain.ai passwd123
docker exec -ti xx setup email add user@domain.ai passwd123
docker exec -ti x setup alias add postmaster@domain.ai user@domain.ai
#
#docker exec -it xx setup config dkim
#docker exec -ti xx setup email add xx@domain.ai passwd123
#docker exec -ti xx setup email add user@domain.ai passwd123
#docker exec -ti x setup alias add postmaster@domain.ai user@domain.ai
echo "Done!"