FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN echo 'postfix postfix/mailname string mail.overwatch.kerabat.digital' | debconf-set-selections \
 && echo 'postfix postfix/main_mailer_type string Internet Site' | debconf-set-selections \
 && apt-get update && apt-get install -y --no-install-recommends postfix opendkim opendkim-tools supervisor ca-certificates \
 && rm -rf /var/lib/apt/lists/*
COPY main.cf /etc/postfix/main.cf
COPY opendkim.conf /etc/opendkim.conf
COPY supervisord.conf /etc/supervisor/conf.d/overwatch.conf
COPY start.sh /usr/local/bin/overwatch-smtp
RUN chmod 755 /usr/local/bin/overwatch-smtp
CMD ["/usr/local/bin/overwatch-smtp"]
