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
 DOVECOT_SASL_PORT=12345
10
 DOVECOT_SASL_PORT=12345
11
 DOVECOT_LMTP_PORT=24
11
 DOVECOT_LMTP_PORT=24
12
 
12
 
13
+POSTFIX_HOST=postfix.mx.internal.docker
14
+
13
 OPENDKIM_HOST=opendkim.mx.internal.docker
15
 OPENDKIM_HOST=opendkim.mx.internal.docker
14
 OPENDKIM_PORT=12345
16
 OPENDKIM_PORT=12345

+ 4
- 4
postfixadmin/Dockerfile View File

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

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

122
 // Mail Server
122
 // Mail Server
123
 // Hostname (FQDN) of your mail server.
123
 // Hostname (FQDN) of your mail server.
124
 // This is used to send email to Postfix in order to create mailboxes.
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
 $CONF['smtp_port'] = '25';
126
 $CONF['smtp_port'] = '25';
127
 
127
 
128
 // SMTP Client
128
 // SMTP Client

+ 2
- 0
postfixadmin/run.sh View File

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

Loading…
Cancel
Save