This article has not been completed yet. However, it may already contain helpful Information and therefore it has been published at this stage.

Setting Up Office 365

Collecting Setup - Informations (Office 365 MX record)

Setting Up the Docker Mail-Relay Container

cd /var/lib/docker/custom_container

mkdir mail-relay

cd mail-relay

nano Dockerfile
FROM ubuntu:latest

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -q -y postfix rsyslog && \
postconf -e relayhost=<office 365 mx hostname> && \
postconf -e mynetworks=""


CMD ["sh", "-c", "service rsyslog start ; service postfix start ; tail -F /var/log/mail.log"]
docker build . -t "mail-relay"
docker run -d -p 25:25 --restart always mail-relay
docker ps -a

Link: Download Portable SMTP Tester 1.0.1



Link 2

Link 3

Link 4