Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenDKIM Database support #8

Closed
jchook opened this issue May 16, 2023 · 1 comment
Closed

OpenDKIM Database support #8

jchook opened this issue May 16, 2023 · 1 comment
Assignees

Comments

@jchook
Copy link

jchook commented May 16, 2023

DKIM optionally supports databases via opendbx.

Would be willing to contribute SQL support if it would be merged.

My current Dockerfile for DKIM
FROM alpine:3.14

ENV DKIM_SOCKET="inet:3000"

EXPOSE 3000

# Install dependencies
RUN apk add --no-cache \
    gettext \
    libmilter \
    mariadb-dev \
    s6-overlay \
  && apk add --no-cache --virtual .tool-deps \
    coreutils autoconf automake g++ libtool make \
     \
  && apk add --no-cache --virtual .build-deps \
    db-dev \
    libmilter-dev \
    openssl-dev \
    readline-dev

# Copy pre-downloaded packages
COPY packages /opt/packages/

# Compile and install opendbx
RUN cd /opt/packages \
  && tar xzf opendbx-1.4.6.tar.gz \
  && cp config.guess opendbx-1.4.6 \
  && cp config.sub opendbx-1.4.6 \
  && cd opendbx-1.4.6/ \
  && CPPFLAGS="-I/usr/include/mysql" ./configure --with-backends="mysql" \
  && make install

# Compile and install OpenDKIM
# The apk version doesn't have important flags we need
RUN cd /opt/packages \
  && tar xzf 2.11.0-Beta2.tar.gz \
  && cd OpenDKIM-2.11.0-Beta2 \
  && autoreconf -vif \
  && CPPFLAGS="-I/usr/include/openssl" ./configure \
    --sysconfdir=/etc/opendkim \
    --with-odbx \
    --with-openssl \
    --with-sql-backend \
    --docdir=/tmp/opendkim/doc \
    --htmldir=/tmp/opendkim/html \
    --infodir=/tmp/opendkim/info \
    --mandir=/tmp/opendkim/man \
  && make \
  && addgroup -S -g 91 opendkim \
  && adduser \
    -S -u 90 -D \
    -s /sbin/nologin \
    -H -h /run/opendkim \
    -G opendkim -g opendkim \
    opendkim \
  && addgroup opendkim mail \
  && make install \
  && install -d -o opendkim -g opendkim /run/opendkim/ \
  && install -d /etc/opendkim/conf.d/ \
  && install -d /usr/share/licenses/opendkim/ \
  && mv /tmp/opendkim/doc/LICENSE* /usr/share/licenses/opendkim/ \
    \
  && apk del .tool-deps .build-deps \
  && rm -rf /var/cache/apk/* /tmp/*

RUN mkdir -p /etc/opendkim/

# Copy files
COPY rootfs /

ENTRYPOINT ["/init"]

CMD ["opendkim", "-f"]
@tyranron
Copy link
Member

@jchook yes, would like to see a PR. It will likely be merged.

@jchook jchook mentioned this issue Jun 4, 2023
@jchook jchook closed this as completed Jul 4, 2023
@jchook jchook closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants