Robin Thoni 8 лет назад
Родитель
Сommit
91a11d62b6

+ 1
- 1
.gitignore Просмотреть файл

@@ -1,4 +1,4 @@
1 1
 *.swp
2
-/data/postgresql/data
2
+/data
3 3
 /postfix/certs/*.crt
4 4
 /postfix/certs/*.key

+ 20
- 4
docker-compose.yml Просмотреть файл

@@ -11,7 +11,7 @@ services:
11 11
         volumes:
12 12
             - ./data/postgresql/data:/var/lib/postgresql/data
13 13
         ports:
14
-            - "127.0.0.1:34000:5432"
14
+            - "34000:5432"
15 15
         env_file:
16 16
             - env
17 17
 
@@ -23,7 +23,7 @@ services:
23 23
                 aliases:
24 24
                     - postfixadmin.internal.docker
25 25
         ports:
26
-            - "127.0.0.1:34001:80"
26
+            - "34001:80"
27 27
         env_file:
28 28
             - env
29 29
 
@@ -34,13 +34,29 @@ services:
34 34
             internal.docker:
35 35
                 aliases:
36 36
                     - postfix.internal.docker
37
-        volumes:
38
-          - ./data/email:/var/email
39 37
         ports:
40 38
             - "0.0.0.0:25:25"
41 39
             - "0.0.0.0:587:587"
42 40
         env_file:
43 41
             - env
44 42
 
43
+    dovecot:
44
+        build: ./dovecot
45
+        container_name: mx-dovecot
46
+        networks:
47
+            internal.docker:
48
+                aliases:
49
+                    - dovecot.internal.docker
50
+        volumes:
51
+            - ./data/email:/var/email
52
+        ports:
53
+            - "0.0.0.0:110:110"
54
+            - "0.0.0.0:143:143"
55
+            - "0.0.0.0:993:993"
56
+            - "0.0.0.0:995:995"
57
+            - "0.0.0.0:4190:4190"
58
+        env_file:
59
+            - env
60
+
45 61
 networks:
46 62
     internal.docker:

+ 24
- 0
dovecot/Dockerfile Просмотреть файл

@@ -0,0 +1,24 @@
1
+FROM debian:jessie
2
+
3
+MAINTAINER Robin Thoni <robin@rthoni.com>
4
+
5
+RUN groupadd -r email --gid=7788 && useradd -r -g email --uid=7788 email
6
+
7
+
8
+RUN apt-get update &&\
9
+    apt-get install -y dovecot-imapd dovecot-pop3d dovecot-sieve dovecot-managesieved dovecot-pgsql dovecot-lmtpd &&\
10
+    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
11
+
12
+COPY ./run.sh /run.sh
13
+
14
+RUN rm -rf /etc/dovecot/*
15
+
16
+COPY ./config/ /etc/dovecot/
17
+
18
+COPY ./certs/ /etc/ssl/private/
19
+
20
+VOLUME ["/var/email"]
21
+
22
+EXPOSE 110 143 993 995 4190
23
+
24
+CMD ["/run.sh"]

+ 27
- 0
dovecot/certs/mail-chain.crt Просмотреть файл

@@ -0,0 +1,27 @@
1
+-----BEGIN CERTIFICATE-----
2
+MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
3
+MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
4
+DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow
5
+SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT
6
+GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC
7
+AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF
8
+q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8
9
+SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0
10
+Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA
11
+a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj
12
+/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T
13
+AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG
14
+CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv
15
+bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k
16
+c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw
17
+VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC
18
+ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz
19
+MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu
20
+Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF
21
+AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo
22
+uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/
23
+wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu
24
+X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG
25
+PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6
26
+KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==
27
+-----END CERTIFICATE-----

+ 29
- 0
dovecot/certs/mail.crt Просмотреть файл

@@ -0,0 +1,29 @@
1
+-----BEGIN CERTIFICATE-----
2
+MIIFCDCCA/CgAwIBAgISA0bw/dFjshZheK4A2j6abebZMA0GCSqGSIb3DQEBCwUA
3
+MEoxCzAJBgNVB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BQcCARYa
19
+aHR0cDovL2Nwcy5sZXRzZW5jcnlwdC5vcmcwgasGCCsGAQUFBwICMIGeDIGbVGhp
20
+cyBDZXJ0aWZpY2F0ZSBtYXkgb25seSBiZSByZWxpZWQgdXBvbiBieSBSZWx5aW5n
21
+IFBhcnRpZXMgYW5kIG9ubHkgaW4gYWNjb3JkYW5jZSB3aXRoIHRoZSBDZXJ0aWZp
22
+Y2F0ZSBQb2xpY3kgZm91bmQgYXQgaHR0cHM6Ly9sZXRzZW5jcnlwdC5vcmcvcmVw
23
+b3NpdG9yeS8wDQYJKoZIhvcNAQELBQADggEBAAj8JtQIVKgwX/Clbn1diDvLB2f1
24
+g8/iZS2tggoMgwkwQXVwQXP8RIsvsMzo2LUss3Rkyahn+kB+EyN6nQHu0NC5qVoj
25
+ZPz13BqiQDgI07tpZLP9UlEroabf7jEaHL8/jM9Dg+6DnX4vUAEPw25cW98yih+v
26
+xSk50sq0NkBK26+Id+Yh7F6FlHXOoBespgia17NVVVkhOnTIuwLGvAPgS3N6dn5r
27
+bVjiEAGRnC2YPmIhQjbhuxDYJjYg1BXMhpGTp/SeI4Rh182TJq3hqt5Vdsa8xLpS
28
+G00CWC3Qo9DoM0ct+iLWXuVtKiMLGSPY53vASmfwSvQ9hcsJ6pFrZ2vbiI4=
29
+-----END CERTIFICATE-----

+ 28
- 0
dovecot/certs/mail.key Просмотреть файл

@@ -0,0 +1,28 @@
1
+-----BEGIN PRIVATE KEY-----
2
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCqfDo07O5o8tPN
3
+LLd6oqyn8orgCJRRnlik895rzlxzQsjfM8gslW3WHOiHViVP7QDiQ3yf+UhITgoB
4
+DXtUjHJAl7XtXj+s3vF43COFz7o+IfknzT6h7+RBrsvjqUY4ihCM0C0l7jVaxmyK
5
+kabCrYjc57tGPQhC/clCPpKUP8HKLWADEGT5tlkaqncNv24Q+LHK48vETiqjZc/Q
6
+1TdXkR2Nxaehev8mG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L4jSlN7kM+xYaZNPCsvTHd6YqA0IIcjNyG83wqMZNzNshe4dZBH1nZDyrmcfrW
23
+tj8yO4QBNBN2T1Em23c3aWcQlf3sJtaIKOxbPtND1z7wQRD/Zq0TGVsAtxHnc62I
24
+oBjQjiohp7neeDASz+MyQQuo1eDF30ww60v9nSspAoGBAID/B/bSsJRbAiLPmJvm
25
+pody9iAZ/YLPg37m4XXP8Onw/wAIj+Lyv6AI2/Yla7hv4kmlvGwh09wWCNPultmT
26
+UolwmSoNqF8k5zBMuetysptgbFJInNrmKy31IpKkNWsiZVk9FMfJukS3C+SSBY+p
27
+bOCRTaXLqUnLFENcjkgiuX/2
28
+-----END PRIVATE KEY-----

+ 54
- 0
dovecot/config/dovecot-dict-auth.conf.ext Просмотреть файл

@@ -0,0 +1,54 @@
1
+# This file is commonly accessed via passdb {} or userdb {} section in
2
+# conf.d/auth-dict.conf.ext
3
+
4
+# Dictionary URI
5
+#uri = 
6
+
7
+# Default password scheme
8
+default_pass_scheme = MD5
9
+
10
+# Username iteration prefix. Keys under this are assumed to contain usernames.
11
+iterate_prefix = userdb/
12
+
13
+# Should iteration be disabled for this userdb? If this userdb acts only as a
14
+# cache there's no reason to try to iterate the (partial & duplicate) users.
15
+#iterate_disable = no
16
+
17
+# The example here shows how to do multiple dict lookups and merge the replies.
18
+# The "passdb" and "userdb" keys are JSON objects containing key/value pairs,
19
+# for example: { "uid": 1000, "gid": 1000, "home": "/home/user" }
20
+
21
+key passdb {
22
+  key = passdb/%u
23
+  format = json
24
+}
25
+key userdb {
26
+  key = userdb/%u
27
+  format = json
28
+}
29
+key quota {
30
+  key = userdb/%u/quota
31
+  #format = value
32
+  # The default_value is used if the key isn't found. If default_value setting
33
+  # isn't specified at all (even as empty), the passdb/userdb lookup fails with
34
+  # "user doesn't exist".
35
+  default_value = 100M
36
+}
37
+
38
+# Space separated list of keys whose values contain key/value paired objects.
39
+# All the key/value pairs inside the object are added as passdb fields.
40
+passdb_objects = passdb
41
+
42
+#passdb_fields {
43
+#}
44
+
45
+# Userdb key/value object list.
46
+userdb_objects = userdb
47
+
48
+userdb_fields {
49
+  # dict:<key> refers to key names
50
+  quota_rule = *:storage=%{dict:quota}
51
+
52
+  # dict:<key>.<objkey> refers to the objkey inside (JSON) object
53
+  mail = maildir:%{dict:userdb.home}/Maildir
54
+}

+ 5
- 0
dovecot/config/dovecot-pgsql.conf Просмотреть файл

@@ -0,0 +1,5 @@
1
+driver = pgsql
2
+connect = host=localhost dbname=postfixadmin user=postfixadmin password=fNzBE6acH5ZNLuLc
3
+default_pass_scheme = MD5-CRYPT
4
+user_query = SELECT '/var/email/%d/%n' as home, 7788 AS uid, 7788 AS gid FROM mailbox WHERE username = '%u'
5
+password_query = SELECT password FROM mailbox WHERE username = '%u'

+ 84
- 0
dovecot/config/dovecot.conf Просмотреть файл

@@ -0,0 +1,84 @@
1
+# 2.1.7: /etc/dovecot/dovecot.conf
2
+# OS: Linux 2.6.35.8-ikhpv1 x86_64 Debian 7.6 ext3
3
+mail_debug = yes
4
+auth_mechanisms = plain login
5
+auth_verbose = yes
6
+first_valid_gid = 7788
7
+first_valid_uid = 7788
8
+last_valid_gid = 7788
9
+last_valid_uid = 7788
10
+log_timestamp = "%Y-%m-%d %H:%M:%S "
11
+mail_location = maildir:/var/email/%d/%n/Maildir:LAYOUT=fs
12
+mail_privileged_group = email
13
+passdb {
14
+  args = /etc/dovecot/dovecot-pgsql.conf
15
+  driver = sql
16
+}
17
+protocols = imap pop3 sieve lmtp
18
+service auth {
19
+  executable = /usr/lib/dovecot/auth
20
+  inet_listener {
21
+    port = DOVECOT_SASL_PORT
22
+    address = 0.0.0.0
23
+  }
24
+  unix_listener auth-master {
25
+    group = email
26
+    mode = 0600
27
+    user = email
28
+  }
29
+}
30
+ssl_ca = </etc/ssl/private/mail-chain.crt
31
+ssl_cert = </etc/ssl/private/mail.crt
32
+ssl_key = </etc/ssl/private/mail.key
33
+userdb {
34
+  args = /etc/dovecot/dovecot-pgsql.conf
35
+  driver = sql
36
+}
37
+protocol lda {
38
+  auth_socket_path = /var/run/dovecot/auth-master
39
+  mail_plugins = sieve
40
+  postmaster_address = postmaster@example.org
41
+}
42
+
43
+plugin {
44
+  # The path to the user's main active script. If ManageSieve is used, this the
45
+  # location of the symbolic link controlled by ManageSieve.
46
+  sieve = ~/.dovecot.sieve
47
+  sieve_before = ~/sieve/01_vacation.sieve
48
+  sieve_extensions = +vacation +vacation-seconds
49
+
50
+  # The default Sieve script when the user has none. This is a path to a global
51
+  # sieve script file, which gets executed ONLY if user's private Sieve script
52
+  # doesn't exist. Be sure to pre-compile this script manually using the sievec
53
+  # command line tool.
54
+  # --> See sieve_before fore executing scripts before the user's personal
55
+  #     script.
56
+  #sieve_default = /var/lib/dovecot/sieve/default.sieve
57
+
58
+  # Directory for :personal include scripts for the include extension. This
59
+  # is also where the ManageSieve service stores the user's scripts.
60
+  sieve_dir = ~/sieve
61
+
62
+  # Directory for :global include scripts for the include extension. 
63
+  sieve_global_dir = /etc/dovecot/sieve/global/
64
+  sieve_global_path = /etc/dovecot/sieve/default.sieve
65
+}
66
+
67
+service managesieve-login {
68
+  inet_listener sieve {
69
+    address = 0.0.0.0
70
+  }
71
+}
72
+
73
+log_path = /dev/stderr
74
+
75
+postmaster_address = postmaster@example.org
76
+
77
+service lmtp {
78
+  # Create inet listener only if you can't use the above UNIX socket
79
+  inet_listener lmtp {
80
+    # Avoid making LMTP visible for the entire internet
81
+    address = 0.0.0.0
82
+    port = DOVECOT_LMTP_PORT
83
+  }
84
+}

+ 8
- 0
dovecot/run.sh Просмотреть файл

@@ -0,0 +1,8 @@
1
+#! /usr/bin/env sh
2
+
3
+sed -e "s/connect *=.*/connect = host=${POSTGRES_HOST} dbname=${POSTGRES_DB} user=${POSTGRES_USER} password=${POSTGRES_PASSWORD}/g" -i /etc/dovecot/dovecot-pgsql.conf
4
+
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
7
+
8
+dovecot -F

+ 9
- 2
env Просмотреть файл

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

+ 0
- 2
postfix/Dockerfile Просмотреть файл

@@ -21,8 +21,6 @@ COPY ./config/ /etc/postfix/
21 21
 
22 22
 COPY ./certs/ /etc/ssl/private/
23 23
 
24
-VOLUME ["/var/email"]
25
-
26 24
 EXPOSE 25 587
27 25
 
28 26
 CMD ["/run.sh"]

+ 3
- 4
postfix/config/main.cf Просмотреть файл

@@ -33,8 +33,7 @@ mailbox_size_limit = 0
33 33
 recipient_delimiter = +
34 34
 inet_interfaces = all
35 35
 
36
-virtual_mailbox_base=/var/email
37
-recipient_bcc_maps = pgsql:/etc/postfix/recipient_bcc.cf
36
+recipient_bcc_maps = pgsql:/etc/postfix/pgsql_recipient_bcc.cf
38 37
 transport_maps = pgsql:/etc/postfix/pgsql_transport.cf
39 38
 virtual_mailbox_domains = pgsql:/etc/postfix/pgsql_virtual_mailbox_domains.cf
40 39
 virtual_mailbox_maps = pgsql:/etc/postfix/pgsql_virtual_mailbox_maps.cf
@@ -45,7 +44,7 @@ relay_domains = pgsql:/etc/postfix/pgsql_relay_domains.cf
45 44
 virtual_minimum_uid=100
46 45
 virtual_uid_maps=static:7788
47 46
 virtual_gid_maps=static:7788
48
-virtual_transport=dovecot
47
+virtual_transport=dovecot_24
49 48
 dovecot_destination_recipient_limit = 1
50 49
 
51 50
 
@@ -66,7 +65,7 @@ queue_directory=/var/spool/postfix
66 65
 
67 66
 
68 67
 smtpd_sasl_type=dovecot
69
-smtpd_sasl_path=private/auth
68
+smtpd_sasl_path=dovecot_12345
70 69
 smtpd_sasl_auth_enable=yes
71 70
 broken_sasl_auth_clients=yes
72 71
 smtpd_sasl_security_options=noanonymous

+ 0
- 2
postfix/config/master.cf Просмотреть файл

@@ -110,5 +110,3 @@ mailman   unix  -       n       n       -       -       pipe
110 110
 dovecot   unix  -       n       n       -       -       pipe
111 111
   flags=DRhu user=email:email argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
112 112
 
113
-robotasm unix   -   n   n   -   -   pipe
114
-    flags=F user=email:email argv=/usr/local/bin/robotasm

+ 5
- 3
postfix/run.sh Просмотреть файл

@@ -7,10 +7,12 @@ sed -e "s/dbname *=.*/dbname = ${POSTGRES_DB}/g" -i /etc/postfix/pgsql_*
7 7
 
8 8
 postconf -e mydomain="${MAIL_DOMAIN}"
9 9
 postconf -e myhostname="${MAIL_HOSTNAME}"
10
+postconf -e smtpd_sasl_path="inet:${DOVECOT_HOST}:${DOVECOT_SASL_PORT}"
11
+postconf -e virtual_transport="lmtp:inet:${DOVECOT_HOST}:${DOVECOT_LMTP_PORT}"
10 12
 
11
-service rsyslog start
12
-service postfix start
13
+service rsyslog start &&
14
+service postfix start &&
13 15
 
14
-sleep 3
16
+sleep 3 &&
15 17
 
16 18
 tail -f /var/log/mail.info

+ 1
- 1
postfixadmin/run.sh Просмотреть файл

@@ -1,4 +1,4 @@
1 1
 #!/bin/bash
2 2
 
3
-rm /run/apache2/apache2.pid
3
+rm -f /run/apache2/apache2.pid
4 4
 exec /usr/sbin/apache2ctl -D FOREGROUND

Загрузка…
Отмена
Сохранить