Hello guys!
I hope to find some information in here, as I’m honestly lost and close to giving up on Mailcow all together.
I don’t really know which category to use as well, so putting it here.I’m trying to install Mailcow on Ubuntu 22.04LTS.
So, I have installed everything according to documentation, then followed up to setting up advanced SSL (I have my own certificate that i installed on it).
I copied the files(the certificates are tested and are known to be good), didn’t use symlinks. I disabled Let’s encrypt by configuring option SKIP_LETS_ENCRYPT=y in mailcow.conf.
The certificates are working well, I have proper https, but I cannot use SMTP. All i see in the gui logs is:
I made sure to import the CA to the trusted store on the machine, and just did so manually by command:
docker exec -it mailcowdockerized-postfix-mailcow-1 echo /usr/local/share/ca-certificates/selfsignCA.crt >> /etc/ca-certificates.conf
For some reason it doesn’t work via my Dockerfile, which I put here:
FROM debian:bullseye-slim
LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>"
ARG DEBIAN_FRONTEND=noninteractive
ENV LC_ALL C
RUN dpkg-divert --local --rename --add /sbin/initctl \
&& ln -sf /bin/true /sbin/initctl \
&& dpkg-divert --local --rename --add /usr/bin/ischroot \
&& ln -sf /bin/true /usr/bin/ischroot
# Add groups and users before installing Postfix to not break compatibility
RUN groupadd -g 102 postfix \
&& groupadd -g 103 postdrop \
&& useradd -g postfix -u 101 -d /var/spool/postfix -s /usr/sbin/nologin postfix \
&& apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dirmngr \
dnsutils \
gnupg \
libsasl2-modules \
mariadb-client \
perl \
postfix \
postfix-mysql \
postfix-pcre \
redis-tools \
sasl2-bin \
sudo \
supervisor \
syslog-ng \
syslog-ng-core \
syslog-ng-mod-redis \
tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& touch /etc/default/locale \
&& printf '#!/bin/bash\n/usr/sbin/postconf -c /opt/postfix/conf "$@"' > /usr/local/sbin/postconf \
&& chmod +x /usr/local/sbin/postconf
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
COPY syslog-ng-redis_slave.conf /etc/syslog-ng/syslog-ng-redis_slave.conf
COPY postfix.sh /opt/postfix.sh
COPY rspamd-pipe-ham /usr/local/bin/rspamd-pipe-ham
COPY rspamd-pipe-spam /usr/local/bin/rspamd-pipe-spam
COPY whitelist_forwardinghosts.sh /usr/local/bin/whitelist_forwardinghosts.sh
COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY selfsignCA.crt /usr/local/share/ca-certificates/selfsignCA.crt
RUN chmod +x /opt/postfix.sh \
/usr/local/bin/rspamd-pipe-ham \
/usr/local/bin/rspamd-pipe-spam \
/usr/local/bin/whitelist_forwardinghosts.sh \
/usr/local/sbin/stop-supervisor.sh
RUN rm -rf /tmp/* /var/tmp/*
EXPOSE 588
ENTRYPOINT ["/docker-entrypoint.sh"]
RUN echo selfsignCA.crt >> /etc/ca-certificates.conf
RUN update-ca-certificates
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
On the service I’m trying to use the SMTP on, I have following:
I’m seriously at a loss here. I don’t know what else might be useful, but I will happily provide all the information ASAP as I see some is needed.
EDIT:code formatting