From d8778b30cc51e41c6e3894b12bb340b462e14496 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Wed, 25 Sep 2024 15:18:20 +0300 Subject: [PATCH] update --- .../Email/App/Console/SetupEmailServer.php | 1 + .../resources/views/server/postfix/main.cf | 12 +++--- .../postfix/sql/mysql_virtual_alias_maps.cf | 2 +- .../postfix/sql/mysql_virtual_domains_maps.cf | 2 +- .../postfix/sql/mysql_virtual_mailbox_maps.cf | 2 +- .../Email/server/docker/docker-compose.yaml | 39 ------------------- 6 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 web/Modules/Email/server/docker/docker-compose.yaml diff --git a/web/Modules/Email/App/Console/SetupEmailServer.php b/web/Modules/Email/App/Console/SetupEmailServer.php index e8005b5..dce4937 100644 --- a/web/Modules/Email/App/Console/SetupEmailServer.php +++ b/web/Modules/Email/App/Console/SetupEmailServer.php @@ -81,6 +81,7 @@ class SetupEmailServer extends Command shell_exec('systemctl restart dovecot'); shell_exec('systemctl restart postfix'); + shell_exec('systemctl restart opendkim'); } diff --git a/web/Modules/Email/resources/views/server/postfix/main.cf b/web/Modules/Email/resources/views/server/postfix/main.cf index 4ed44c5..4eaf8e9 100644 --- a/web/Modules/Email/resources/views/server/postfix/main.cf +++ b/web/Modules/Email/resources/views/server/postfix/main.cf @@ -44,7 +44,7 @@ smtp_sasl_local_domain = $myhostname smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_sender_restrictions = permit_sasl_authenticated smtp_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination -smtp_milters = inet:127.0.0.1:8891 +# smtp_milters = inet:127.0.0.1:8891 # SMTPD @if(!empty($sslPaths)) @@ -64,13 +64,13 @@ smtpd_sasl_local_domain = $myhostname smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_sender_restrictions = permit_sasl_authenticated smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination -smtpd_milters = inet:127.0.0.1:8891 +# smtpd_milters = inet:127.0.0.1:8891 # DKIM -milter_default_action = accept -milter_protocol = 2 -non_smtpd_milters = inet:127.0.0.1:8891 -non_smtp_milters = inet:127.0.0.1:8891 +# milter_default_action = accept +# milter_protocol = 2 +# non_smtpd_milters = inet:127.0.0.1:8891 +# non_smtp_milters = inet:127.0.0.1:8891 # Virtual Domains virtual_mailbox_base = 0 diff --git a/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_alias_maps.cf b/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_alias_maps.cf index d114299..29a9428 100644 --- a/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_alias_maps.cf +++ b/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_alias_maps.cf @@ -3,4 +3,4 @@ password = {{$password}} hosts = {{$host}} dbname = {{$database}} port = {{$port}} -query = SELECT goto FROM alias WHERE address='%s' AND active = '1' +query = SELECT goto FROM email_aliases WHERE address='%s' diff --git a/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_domains_maps.cf b/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_domains_maps.cf index ab74771..d24326c 100644 --- a/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_domains_maps.cf +++ b/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_domains_maps.cf @@ -3,4 +3,4 @@ password = {{$password}} hosts = {{$host}} dbname = {{$database}} port = {{$port}} -query = SELECT domain FROM domain WHERE domain='%s' AND active = '1' +query = SELECT domain FROM domains WHERE domain='%s' diff --git a/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_mailbox_maps.cf b/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_mailbox_maps.cf index 79f7750..36daee6 100644 --- a/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_mailbox_maps.cf +++ b/web/Modules/Email/resources/views/server/postfix/sql/mysql_virtual_mailbox_maps.cf @@ -3,4 +3,4 @@ password = {{$password}} hosts = {{$host}} dbname = {{$database}} port = {{$port}} -query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1' +query = SELECT maildir FROM email_boxes WHERE username='%s' diff --git a/web/Modules/Email/server/docker/docker-compose.yaml b/web/Modules/Email/server/docker/docker-compose.yaml deleted file mode 100644 index 70836ca..0000000 --- a/web/Modules/Email/server/docker/docker-compose.yaml +++ /dev/null @@ -1,39 +0,0 @@ -services: - mailserver: - image: ghcr.io/docker-mailserver/docker-mailserver:latest - container_name: {{$containerName}} - # Provide the FQDN of your mail server here (Your DNS MX record should point to this value) - hostname: {{$hostName}} - ports: - - "25:25" # SMTP (explicit TLS => STARTTLS) - - "465:465" # ESMTP (implicit TLS) - - "587:587" # ESMTP (explicit TLS => STARTTLS) - - "993:993" # IMAP4 (implicit TLS) - - "143:143" # IMAP4 (explicit TLS => STARTTLS) - - "110:110" # POP3 - - "995:995" # POP3 (with TLS) - volumes: - - {{$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 - - {{$workPath}}/docker-data/acme-companion/certs/:/etc/letsencrypt/live/:ro - - environment: - - SSL_TYPE=letsencrypt - - VIRTUAL_HOST={{$hostName}} - - LETSENCRYPT_HOST={{$hostName}} - - ENABLE_FAIL2BAN=0 - - PERMIT_DOCKER=network - - ONE_DIR=1 - - ENABLE_POSTGREY=0 - - ENABLE_CLAMAV=0 - - ENABLE_SPAMASSASSIN=0 - - SPOOF_PROTECTION=0 - - ENABLE_POP3=1 - - POSTMASTER_ADDRESS=postmaster@localhost.localdomain - cap_add: - - NET_ADMIN - - SYS_PTRACE - restart: always