Browse Source

fixed postfixadmin smtp server

tags/v1.0.0
Robin Thoni 8 years ago
parent
commit
89462f6238
4 changed files with 9 additions and 5 deletions
  1. 2
    0
      env
  2. 4
    4
      postfixadmin/Dockerfile
  3. 1
    1
      postfixadmin/postfixadmin-3.0/config.inc.php
  4. 2
    0
      postfixadmin/run.sh

+ 2
- 0
env View File

@@ -10,5 +10,7 @@ DOVECOT_HOST=dovecot.mx.internal.docker
10 10
 DOVECOT_SASL_PORT=12345
11 11
 DOVECOT_LMTP_PORT=24
12 12
 
13
+POSTFIX_HOST=postfix.mx.internal.docker
14
+
13 15
 OPENDKIM_HOST=opendkim.mx.internal.docker
14 16
 OPENDKIM_PORT=12345

+ 4
- 4
postfixadmin/Dockerfile View File

@@ -3,8 +3,6 @@ FROM debian:jessie
3 3
 # FROM https://github.com/ZHAJOR/Docker-Apache-2.4-Php-5.6-for-Laravel
4 4
 MAINTAINER Robin Thoni <robin@rthoni.com>
5 5
 
6
-COPY run.sh /run.sh
7
-
8 6
 RUN apt-get update && apt-get -y install\
9 7
         apache2=2.4.*\
10 8
         libapache2-mod-php5\
@@ -20,15 +18,17 @@ RUN apt-get update && apt-get -y install\
20 18
         rm -rf /var/www/html &&\
21 19
         mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html &&\
22 20
         chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html &&\
23
-        chmod -v +x /run.sh &&\
24 21
         ln -sf /dev/stderr /var/log/apache2/error.log &&\
25 22
         ln -sf /dev/stdout /var/log/apache2/access.log
26 23
 
27 24
 COPY apache2.conf /etc/apache2/apache2.conf
28 25
 
29
-EXPOSE 80
30 26
 
31 27
 COPY ./postfixadmin-3.0/ /var/www/html/
32 28
 RUN chmod -R 777 /var/www/html/templates_c
33 29
 
30
+COPY run.sh /run.sh
31
+
32
+EXPOSE 80
33
+
34 34
 CMD ["/run.sh"]

+ 1
- 1
postfixadmin/postfixadmin-3.0/config.inc.php View File

@@ -122,7 +122,7 @@ $CONF['admin_email'] = '';
122 122
 // Mail Server
123 123
 // Hostname (FQDN) of your mail server.
124 124
 // This is used to send email to Postfix in order to create mailboxes.
125
-$CONF['smtp_server'] = 'localhost';
125
+$CONF['smtp_server'] = 'POSTFIX_HOST';
126 126
 $CONF['smtp_port'] = '25';
127 127
 
128 128
 // SMTP Client

+ 2
- 0
postfixadmin/run.sh View File

@@ -1,4 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
+sed -e "s/POSTFIX_HOST/${POSTFIX_HOST}/" -i /var/www/html/config.inc.php
4
+
3 5
 rm -f /run/apache2/apache2.pid
4 6
 exec /usr/sbin/apache2ctl -D FOREGROUND

Loading…
Cancel
Save