From fbbe374f2ced2e409ef8771fe5416ec6fbd10f28 Mon Sep 17 00:00:00 2001 From: mlan Date: Wed, 4 Dec 2019 12:19:53 +0100 Subject: [PATCH] - Minor update to demo --- README.md | 3 ++- demo/Makefile | 12 +++++++++++- demo/docker-compose.yml | 6 +++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 42ac02a..f2b2de1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # The `mlan/kopano` repository ![travis-ci test](https://img.shields.io/travis/mlan/docker-kopano.svg?label=build&style=popout-square&logo=travis) +![docker build](https://img.shields.io/docker/cloud/build/mlan/kopano.svg?label=build&style=popout-square&logo=docker) ![image Size](https://img.shields.io/microbadger/image-size/mlan/kopano.svg?label=size&style=popout-square&logo=docker) ![docker stars](https://img.shields.io/docker/stars/mlan/kopano.svg?label=stars&style=popout-square&logo=docker) ![docker pulls](https://img.shields.io/docker/pulls/mlan/kopano.svg?label=pulls&style=popout-square&logo=docker) @@ -55,7 +56,7 @@ The docker compose example below is used to demonstrate how to configure these s An example of how to configure an web mail server using [docker compose](https://docs.docker.com/compose) is given below. It defines 4 services, `mail-app`, `mail-mta`, `mail-db` and `auth`, which are the web mail server, the mail transfer agent, the SQL database and LDAP authentication respectively. ```yaml -version: '3.7' +version: '3' services: mail-app: diff --git a/demo/Makefile b/demo/Makefile index 2f576c1..8fecf23 100644 --- a/demo/Makefile +++ b/demo/Makefile @@ -12,7 +12,7 @@ variables: ps: docker-compose ps -init: auth-up wait_1 auth-add_user mail-db-up mail-mta-up wait_2 mail-app-up +init: auth-up wait_1 auth-mod_index auth-add_user mail-db-up mail-mta-up wait_2 mail-app-up up: docker-compose up -d @@ -56,6 +56,10 @@ auth-add_user: printf "dn: ou=$(LDAP_USEROU),$(LDAP_BASE)\nchangetype: add\nobjectClass: organizationalUnit\nobjectClass: top\nou: $(LDAP_USEROU)\n\ndn: ou=$(LDAP_GROUPOU),$(LDAP_BASE)\nchangetype: add\nobjectClass: organizationalUnit\nobjectClass: top\nou: $(LDAP_GROUPOU)\n\ndn: uid=$(LDAP_TEST_USER),ou=$(LDAP_USEROU),$(LDAP_BASE)\nchangetype: add\nobjectClass: top\nobjectClass: inetOrgPerson\nobjectClass: $(LDAP_USEROBJ)\ncn: $(LDAP_TEST_USER)\nsn: $(LDAP_TEST_USER)\nuid: $(LDAP_TEST_USER)\nmail: $(LDAP_TEST_USER)@$(MAIL_DOMAIN)\nuidNumber: 1234\ngidNumber: 1234\nhomeDirectory: /home/$(LDAP_TEST_USER)\nuserPassword: $(LDAP_TEST_PASSWD)\n" \ | docker-compose exec -T auth ldap modify +auth-mod_index: + printf "dn: olcDatabase={1}mdb,cn=config\nchangetype: modify\nadd: olcDbIndex\nolcDbIndex: cn,ou,uid,mail eq\n" \ + | docker-compose exec -T auth ldap modify + mail-mta-up: docker-compose up -d mail-mta @@ -81,6 +85,12 @@ mail-mta-test: mail-mta-razor: docker-compose exec mail-mta conf cntcfg_razor_register +mail-mta-apk_list: + docker-compose exec mail-mta /bin/sh -c 'for pkg in $$(apk info 2>/dev/null); do printf "%9s %s\n" $$(apk info -s $$pkg 2>/dev/null | sed -n "2{p;q}") $$pkg; done | sort' + +mail-mta-quarantine_list: + docker-compose exec mail-mta amavisd-ls + mail-mta-debugtools: docker-compose exec mail-mta apk --no-cache --update add \ nano less lsof htop openldap-clients bind-tools iputils strace diff --git a/demo/docker-compose.yml b/demo/docker-compose.yml index 6b6e2d8..d33ab74 100644 --- a/demo/docker-compose.yml +++ b/demo/docker-compose.yml @@ -49,7 +49,11 @@ services: - LDAP_USER_BASE=ou=${LDAP_USEROU-users},${LDAP_BASE-dc=example,dc=com} - LDAP_QUERY_FILTER_USER=(&(objectclass=${LDAP_USEROBJ-posixAccount})(mail=%s)) - DKIM_SELECTOR=${DKIM_SELECTOR-default} - - SYSLOG_LEVEL=${SYSLOG_LEVEL-4} + - SA_TAG_LEVEL_DEFLT=${SA_TAG_LEVEL_DEFLT-2.0} + - SA_DEBUG=${SA_DEBUG-0} + - SYSLOG_LEVEL=${SYSLOG_LEVEL-} + - LOG_LEVEL=${LOG_LEVEL-0} + - RAZOR_REGISTRATION=${RAZOR_REGISTRATION-} volumes: - mail-mta:/srv cap_add: # helps debugging by alowing strace