Selaa lähdekoodia

tls fixes

tags/v1.0.0
Robin Thoni 8 vuotta sitten
vanhempi
commit
91bef08a3b
5 muutettua tiedostoa jossa 32 lisäystä ja 15 poistoa
  1. 18
    11
      docker-compose.yml
  2. 5
    1
      dovecot/Dockerfile
  3. 4
    0
      dovecot/config/dovecot.conf
  4. 2
    0
      dovecot/run.sh
  5. 3
    3
      env

+ 18
- 11
docker-compose.yml Näytä tiedosto

@@ -5,9 +5,9 @@ services:
5 5
         build: ./postgresql
6 6
         container_name: mx-postgresql
7 7
         networks:
8
-            internal.docker:
8
+            mx.internal.docker:
9 9
                 aliases:
10
-                    - postgresql.internal.docker
10
+                    - postgresql.mx.internal.docker
11 11
         volumes:
12 12
             - ./data/postgresql/data:/var/lib/postgresql/data
13 13
         ports:
@@ -19,9 +19,9 @@ services:
19 19
         build: ./postfixadmin
20 20
         container_name: mx-postfixadmin
21 21
         networks:
22
-            internal.docker:
22
+            mx.internal.docker:
23 23
                 aliases:
24
-                    - postfixadmin.internal.docker
24
+                    - postfixadmin.mx.internal.docker
25 25
         ports:
26 26
             - "34001:80"
27 27
         env_file:
@@ -31,9 +31,12 @@ services:
31 31
         build: ./postfix
32 32
         container_name: mx-postfix
33 33
         networks:
34
-            internal.docker:
34
+            mx.internal.docker:
35 35
                 aliases:
36
-                    - postfix.internal.docker
36
+                    - postfix.mx.internal.docker
37
+            mx-local.internal.docker:
38
+                aliases:
39
+                    - smtp.mx-local.internal.docker
37 40
         ports:
38 41
             - "0.0.0.0:25:25"
39 42
             - "0.0.0.0:587:587"
@@ -44,9 +47,12 @@ services:
44 47
         build: ./dovecot
45 48
         container_name: mx-dovecot
46 49
         networks:
47
-            internal.docker:
50
+            mx.internal.docker:
51
+                aliases:
52
+                    - dovecot.mx.internal.docker
53
+            mx-local.internal.docker:
48 54
                 aliases:
49
-                    - dovecot.internal.docker
55
+                    - imap.mx-local.internal.docker
50 56
         volumes:
51 57
             - ./data/dovecot/email:/var/email
52 58
             - ./data/dovecot/sieve:/etc/dovecot/sieve
@@ -63,13 +69,14 @@ services:
63 69
         build: ./opendkim
64 70
         container_name: mx-opendkim
65 71
         networks:
66
-            internal.docker:
72
+            mx.internal.docker:
67 73
                 aliases:
68
-                    - opendkim.internal.docker
74
+                    - opendkim.mx.internal.docker
69 75
         volumes:
70 76
             - ./data/opendkim/keys:/etc/opendkim/keys
71 77
         env_file:
72 78
             - env
73 79
 
74 80
 networks:
75
-    internal.docker:
81
+    mx.internal.docker:
82
+    mx-local.internal.docker:

+ 5
- 1
dovecot/Dockerfile Näytä tiedosto

@@ -6,9 +6,13 @@ RUN groupadd -r email --gid=7788 && useradd -r -g email --uid=7788 email
6 6
 
7 7
 
8 8
 RUN apt-get update &&\
9
-    apt-get install -y dovecot-imapd dovecot-pop3d dovecot-sieve dovecot-managesieved dovecot-pgsql dovecot-lmtpd &&\
9
+    apt-get install -y dovecot-imapd dovecot-pop3d dovecot-sieve dovecot-managesieved dovecot-pgsql dovecot-lmtpd exim4 &&\
10 10
     apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
11 11
 
12
+RUN sed -e "s/dc_eximconfig_configtype=.*/dc_eximconfig_configtype='internet'/" -i /etc/exim4/update-exim4.conf.conf &&\
13
+    sed -e "s/dc_other_hostnames=.*/dc_other_hostnames=''/" -i /etc/exim4/update-exim4.conf.conf &&\
14
+    update-exim4.conf
15
+
12 16
 COPY ./run.sh /run.sh
13 17
 
14 18
 RUN rm -rf /etc/dovecot/*

+ 4
- 0
dovecot/config/dovecot.conf Näytä tiedosto

@@ -40,6 +40,10 @@ protocol lda {
40 40
   postmaster_address = postmaster@example.org
41 41
 }
42 42
 
43
+protocol lmtp {
44
+  mail_plugins = sieve
45
+}
46
+
43 47
 plugin {
44 48
   # The path to the user's main active script. If ManageSieve is used, this the
45 49
   # location of the symbolic link controlled by ManageSieve.

+ 2
- 0
dovecot/run.sh Näytä tiedosto

@@ -5,4 +5,6 @@ sed -e "s/connect *=.*/connect = host=${POSTGRES_HOST} dbname=${POSTGRES_DB} use
5 5
 sed -e "s/DOVECOT_LMTP_PORT/${DOVECOT_LMTP_PORT}/" -i /etc/dovecot/dovecot.conf
6 6
 sed -e "s/DOVECOT_SASL_PORT/${DOVECOT_SASL_PORT}/" -i /etc/dovecot/dovecot.conf
7 7
 
8
+service exim4 start &&
9
+
8 10
 dovecot -F

+ 3
- 3
env Näytä tiedosto

@@ -1,4 +1,4 @@
1
-POSTGRES_HOST=postgresql.internal.docker
1
+POSTGRES_HOST=postgresql.mx.internal.docker
2 2
 POSTGRES_USER=postfixadmin
3 3
 POSTGRES_PASSWORD=pg_password
4 4
 POSTGRES_DB=postfixadmin
@@ -6,9 +6,9 @@ POSTGRES_DB=postfixadmin
6 6
 MAIL_DOMAIN=rthoni.com
7 7
 MAIL_HOSTNAME=vm01.rthoni.com
8 8
 
9
-DOVECOT_HOST=dovecot.internal.docker
9
+DOVECOT_HOST=dovecot.mx.internal.docker
10 10
 DOVECOT_SASL_PORT=12345
11 11
 DOVECOT_LMTP_PORT=24
12 12
 
13
-OPENDKIM_HOST=opendkim.internal.docker
13
+OPENDKIM_HOST=opendkim.mx.internal.docker
14 14
 OPENDKIM_PORT=12345

Loading…
Peruuta
Tallenna