From 543e165bc6cee60d7098e7ec07071b3d5b8392fa Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Sat, 11 May 2024 13:03:28 +0300 Subject: [PATCH] update --- web/Modules/Email/docker-compose.yaml | 29 ++++++++++++++ web/Modules/Email/ldap-compose.yaml | 38 ------------------- ...croweberHostingSubscriptionCreateTest.php} | 0 3 files changed, 29 insertions(+), 38 deletions(-) create mode 100644 web/Modules/Email/docker-compose.yaml delete mode 100644 web/Modules/Email/ldap-compose.yaml rename web/tests/Unit/{MicroweberHostingSubscriptionCreateTest.php_ => MicroweberHostingSubscriptionCreateTest.php} (100%) diff --git a/web/Modules/Email/docker-compose.yaml b/web/Modules/Email/docker-compose.yaml new file mode 100644 index 00000000..d57232a7 --- /dev/null +++ b/web/Modules/Email/docker-compose.yaml @@ -0,0 +1,29 @@ +services: + mailserver: + image: ghcr.io/docker-mailserver/docker-mailserver:latest + container_name: mailserver + # Provide the FQDN of your mail server here (Your DNS MX record should point to this value) + hostname: mail.test.phyrepanel.com + ports: + - "25:25" + - "587:587" + - "465:465" + 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/ + - /etc/localtime:/etc/localtime:ro + environment: + - ENABLE_FAIL2BAN=1 + # Using letsencrypt for SSL/TLS certificates: + - SSL_TYPE=letsencrypt + # Allow sending emails from other docker containers: + # Beware creating an Open Relay: https://docker-mailserver.github.io/docker-mailserver/latest/config/environment/#permit_docker + - PERMIT_DOCKER=network + # You may want to enable this: https://docker-mailserver.github.io/docker-mailserver/latest/config/environment/#spoof_protection + # See step 6 below, which demonstrates setup with enabled/disabled SPOOF_PROTECTION: + - SPOOF_PROTECTION=0 + cap_add: + - NET_ADMIN # For Fail2Ban to work + restart: always diff --git a/web/Modules/Email/ldap-compose.yaml b/web/Modules/Email/ldap-compose.yaml deleted file mode 100644 index 47dba255..00000000 --- a/web/Modules/Email/ldap-compose.yaml +++ /dev/null @@ -1,38 +0,0 @@ -services: - phyre-mail-server: - image: ghcr.io/docker-mailserver/docker-mailserver:latest - container_name: mailserver - # Provide the FQDN of your mail server here (Your DNS MX record should point to this value) - hostname: mail.test.phyrepanel.com - ports: - - "25:25" - - "465:465" - - "587:587" - - "993:993" - 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/ - - /etc/localtime:/etc/localtime:ro - environment: - - ACCOUNT_PROVISIONER=LDAP - - LDAP_SERVER_HOST=ldap # your ldap container/IP/ServerName - - LDAP_SEARCH_BASE=ou=people,dc=localhost,dc=localdomain - - LDAP_BIND_DN=cn=admin,dc=localhost,dc=localdomain - - LDAP_BIND_PW=admin - - LDAP_QUERY_FILTER_USER=(&(mail=%s)(mailEnabled=TRUE)) - - LDAP_QUERY_FILTER_GROUP=(&(mailGroupMember=%s)(mailEnabled=TRUE)) - - LDAP_QUERY_FILTER_ALIAS=(|(&(mailAlias=%s)(objectClass=PostfixBookMailForward))(&(mailAlias=%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE))) - - LDAP_QUERY_FILTER_DOMAIN=(|(&(mail=*@%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE))(&(mailGroupMember=*@%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE))(&(mailalias=*@%s)(objectClass=PostfixBookMailForward))) - - DOVECOT_PASS_FILTER=(&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n)) - - DOVECOT_USER_FILTER=(&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n)) - - ENABLE_SASLAUTHD=1 - - SASLAUTHD_MECHANISMS=ldap - - SASLAUTHD_LDAP_SERVER=ldap - - SASLAUTHD_LDAP_BIND_DN=cn=admin,dc=localhost,dc=localdomain - - SASLAUTHD_LDAP_PASSWORD=admin - - SASLAUTHD_LDAP_SEARCH_BASE=ou=people,dc=localhost,dc=localdomain - - SASLAUTHD_LDAP_FILTER=(&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%U)) - - POSTMASTER_ADDRESS=postmaster@localhost.localdomain - restart: always diff --git a/web/tests/Unit/MicroweberHostingSubscriptionCreateTest.php_ b/web/tests/Unit/MicroweberHostingSubscriptionCreateTest.php similarity index 100% rename from web/tests/Unit/MicroweberHostingSubscriptionCreateTest.php_ rename to web/tests/Unit/MicroweberHostingSubscriptionCreateTest.php