-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 996 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM ubuntu:20.04
RUN apt -y update && yes "2" | apt -y --no-install-recommends install openssl telnet vim ruby tzdata postfix opendkim
RUN gem install mail
RUN mv /etc/postfix/main.cf /etc/postfix/main.cf.org
COPY postfix/mailname /etc/
COPY postfix/main.cf /etc/postfix/
COPY postfix/master.cf /etc/postfix/
RUN chmod 644 /etc/postfix/master.cf /etc/postfix/main.cf
RUN mv /etc/opendkim.conf /etc/opendkim.conf.org
COPY opendkim/opendkim.conf /etc/
COPY opendkim/TrustedHosts /etc/opendkim/
# メールのログ関係
RUN mkdir /opt/maillog
RUN mkdir /opt/maillog/log
RUN mkdir /opt/maillog/log/list
RUN mkdir /opt/maillog/log/raw
COPY postfix/log.rb /opt/maillog
RUN chmod -R 777 /opt/maillog
RUN mkdir /mailraw; chmod 777 /mailraw
RUN mkdir /maillsit; chmod 777 /maillsit
RUN echo 'logging: "|/usr/bin/ruby /opt/maillog/log.rb"' >> /etc/aliases
RUN newaliases
COPY scripts/startup.sh /tmp
COPY scripts/setup.sh /tmp
ENTRYPOINT ["/bin/bash", "/tmp/startup.sh"]
EXPOSE 25