Browse Source

tls fixes

tags/v1.0.0
Robin Thoni 7 years ago
parent
commit
91bef08a3b
5 changed files with 32 additions and 15 deletions
  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 View File

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

+ 5
- 1
dovecot/Dockerfile View File

6
 
6
 
7
 
7
 
8
 RUN apt-get update &&\
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
     apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
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
 COPY ./run.sh /run.sh
16
 COPY ./run.sh /run.sh
13
 
17
 
14
 RUN rm -rf /etc/dovecot/*
18
 RUN rm -rf /etc/dovecot/*

+ 4
- 0
dovecot/config/dovecot.conf View File

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

+ 2
- 0
dovecot/run.sh View File

5
 sed -e "s/DOVECOT_LMTP_PORT/${DOVECOT_LMTP_PORT}/" -i /etc/dovecot/dovecot.conf
5
 sed -e "s/DOVECOT_LMTP_PORT/${DOVECOT_LMTP_PORT}/" -i /etc/dovecot/dovecot.conf
6
 sed -e "s/DOVECOT_SASL_PORT/${DOVECOT_SASL_PORT}/" -i /etc/dovecot/dovecot.conf
6
 sed -e "s/DOVECOT_SASL_PORT/${DOVECOT_SASL_PORT}/" -i /etc/dovecot/dovecot.conf
7
 
7
 
8
+service exim4 start &&
9
+
8
 dovecot -F
10
 dovecot -F

+ 3
- 3
env View File

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

Loading…
Cancel
Save