-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build an experimental version (Cyrus 3.8.0~rc1)
- Loading branch information
Showing
6 changed files
with
180 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,27 @@ ENV DEBIAN_VERSION=bullseye | |
|
||
RUN echo "# Install packages from ${DEBIAN_VERSION}" && \ | ||
apt-get -y update && \ | ||
apt-get -y install xz-utils && \ | ||
apt-get -y dist-upgrade && \ | ||
echo "deb http://deb.debian.org/debian" ${DEBIAN_VERSION}"-backports main" > /etc/apt/sources.list.d/backports.list && \ | ||
apt-get -y update | ||
|
||
FROM debian-backports-updated | ||
FROM debian-backports-updated as debian-backports-updated-with-s6 | ||
|
||
ARG S6_OVERLAY_VERSION=3.1.3.0 | ||
|
||
# S6 | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/syslogd-overlay-noarch.tar.xz /tmp | ||
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && rm /tmp/s6-overlay-noarch.tar.xz && \ | ||
tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz && rm /tmp/s6-overlay-x86_64.tar.xz && \ | ||
tar -C / -Jxpf /tmp/syslogd-overlay-noarch.tar.xz && rm /tmp/syslogd-overlay-noarch.tar.xz | ||
|
||
FROM debian-backports-updated-with-s6 | ||
|
||
ENV DEBIAN_VERSION=bullseye | ||
|
||
LABEL maintainer="Yadd [email protected]>" \ | ||
name="yadd/cyrus-imapd-postfix" \ | ||
version="v1.0" | ||
|
@@ -71,13 +84,6 @@ RUN echo 'conversations: 1' >> /etc/imapd.conf | |
RUN echo 'conversations_db: twoskip' >> /etc/imapd.conf | ||
RUN /usr/lib/cyrus/bin/ctl_conversationsdb -b -r | ||
|
||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/syslogd-overlay-noarch.tar.xz /tmp | ||
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && rm /tmp/s6-overlay-noarch.tar.xz && \ | ||
tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz && rm /tmp/s6-overlay-x86_64.tar.xz && \ | ||
tar -C / -Jxpf /tmp/syslogd-overlay-noarch.tar.xz && rm /tmp/syslogd-overlay-noarch.tar.xz | ||
|
||
|
||
EXPOSE 25 465 587 110 143 993 995 2000 8008 8443 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
ARG DEBIANVERSION=unstable | ||
|
||
FROM debian:${DEBIANVERSION}-slim as debian-unstable-updated | ||
|
||
ENV DEBIAN_VERSION=unstable | ||
|
||
COPY apt-order /etc/apt/preferences.d/ | ||
|
||
RUN echo "# Install packages from ${DEBIAN_VERSION}" && \ | ||
echo "deb http://deb.debian.org/debian experimental main" > /etc/apt/sources.list.d/backports.list && \ | ||
apt-get -y update && \ | ||
apt-get -y dist-upgrade && \ | ||
apt-get -y install xz-utils | ||
|
||
FROM debian-unstable-updated as debian-unstable-updated-with-s6 | ||
|
||
ARG S6_OVERLAY_VERSION=3.1.3.0 | ||
|
||
# S6 | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/syslogd-overlay-noarch.tar.xz /tmp | ||
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && rm /tmp/s6-overlay-noarch.tar.xz && \ | ||
tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz && rm /tmp/s6-overlay-x86_64.tar.xz && \ | ||
tar -C / -Jxpf /tmp/syslogd-overlay-noarch.tar.xz && rm /tmp/syslogd-overlay-noarch.tar.xz | ||
|
||
FROM debian-unstable-updated-with-s6 | ||
|
||
ENV DEBIAN_VERSION=bullseye | ||
|
||
LABEL maintainer="Yadd [email protected]>" \ | ||
name="yadd/cyrus-imapd-postfix" \ | ||
version="v1.0" | ||
|
||
ENV DEBIAN_VERSION=bullseye \ | ||
MAILNAME=mail.example.com \ | ||
OTHER_DESTINATIONS="example.com mail.example.com" \ | ||
RELAY_HOST= \ | ||
MYNETWORKS="127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128" \ | ||
ROOT_ADDRESS= \ | ||
CYRUS_PWD= \ | ||
SASL_PWCHECK_METHOD="saslauthd auxprop" \ | ||
SASLDB=sasldb | ||
|
||
RUN \ | ||
echo cyrus-common cyrus-common/removespools boolean false | debconf-set-selections && \ | ||
echo postfix postfix/main_mailer_type select "Internet Site" | debconf-set-selections && \ | ||
echo postfix postfix/mailname string "$MAILNAME" | debconf-set-selections && \ | ||
echo postfix postfix/destinations string "$OTHER_DESTINATIONS" | debconf-set-selections && \ | ||
echo postfix postfix/relayhost string "" | debconf-set-selections && \ | ||
echo postfix postfix/procmail boolean false | debconf-set-selections && \ | ||
echo postfix postfix/protocols select all | debconf-set-selections && \ | ||
echo postfix postfix/recipient_delim string "+" | debconf-set-selections && \ | ||
echo postfix postfix/chattr boolean false | debconf-set-selections && \ | ||
echo postfix postfix/mynetworks string "$MYNETWORKS" | debconf-set-selections && \ | ||
echo postfix postfix/mailbox_limit string 0 | debconf-set-selections && \ | ||
echo postfix postfix/root_address string "$ROOT_ADDRESS" | debconf-set-selections && \ | ||
echo postfix postfix/newaliases boolean false | debconf-set-selections && \ | ||
apt install -y xz-utils \ | ||
cyrus-imapd/experimental \ | ||
cyrus-pop3d/experimental \ | ||
cyrus-nntpd/experimental \ | ||
cyrus-admin/experimental \ | ||
cyrus-caldav/experimental \ | ||
libcyrus-imap-perl/experimental \ | ||
postfix \ | ||
sasl2-bin && \ | ||
apt autoremove -y && apt clean && rm -rf /var/lib/apt/lists/* && \ | ||
rm -f /etc/postfix/master.cf.proto \ | ||
/etc/postfix/sasl_passwd \ | ||
/etc/postfix/canonical \ | ||
/etc/postfix/dynamicmaps.cf \ | ||
/etc/postfix/sasl_passwd.db \ | ||
/etc/postfix/canonical \ | ||
/etc/postfix/dynamicmaps.cf \ | ||
/etc/postfix/sasl_passwd.db \ | ||
/etc/postfix/main.cf \ | ||
/etc/postfix/regexmap \ | ||
/etc/postfix/canonical.db \ | ||
/etc/postfix/master.cf \ | ||
/etc/postfix/main.cf.proto | ||
|
||
RUN perl -i -pe 's/httpmodules: .*$/httpmodules: carddav caldav jmap/' /etc/imapd.conf | ||
RUN echo 'conversations: 1' >> /etc/imapd.conf | ||
RUN echo 'conversations_db: twoskip' >> /etc/imapd.conf | ||
RUN /usr/lib/cyrus/bin/ctl_conversationsdb -b -r | ||
|
||
|
||
EXPOSE 25 465 587 110 143 993 995 2000 8008 8443 | ||
|
||
VOLUME [ "/etc", "/var/lib/cyrus", "/var/spool/cyrus", "/var/spool/mail", "/var/spool/sieve" ] | ||
|
||
copy install / | ||
|
||
CMD ["/usr/sbin/cyrmaster", "-D", "-l", "32", "-C", "/etc/imapd.conf", "-M", "/etc/cyrus.conf"] | ||
|
||
ENTRYPOINT ["/init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Package: * | ||
Pin: release a=unstable | ||
Pin-Priority: 500 | ||
|
||
Package: * | ||
Pin: release a=experimental | ||
Pin-Priority: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/command/with-contenv sh | ||
|
||
mkdir -p /run/cyrus | ||
chown cyrus /run/cyrus | ||
|
||
if test "$CYRUS_PWD" = ""; then | ||
echo "CYRUS_PWD isn't set, unable to configure cyrus adm password" >&2 | ||
else | ||
echo -n "$CYRUS_PWD" | saslpasswd2 -p cyrus | ||
fi | ||
perl -i -pe 's/^sasl_auxprop_plugin:.*$//;s/^sasl_pwcheck_method:.*$/sasl_pwcheck_method: '$SASL_PWCHECK_METHOD'\nsasl_auxprop_plugin: '$SASLDB'/' /etc/imapd.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/command/with-contenv sh | ||
|
||
if test ! -e /etc/postfix/main.cf; then | ||
|
||
#echo cyrus-common cyrus-common/removespools boolean false | debconf-set-selections | ||
#echo postfix postfix/main_mailer_type select "Internet Site" | debconf-set-selections | ||
#echo postfix postfix/relayhost string "" | debconf-set-selections | ||
#echo postfix postfix/procmail boolean false | debconf-set-selections | ||
#echo postfix postfix/protocols select all | debconf-set-selections | ||
#echo postfix postfix/recipient_delim string "+" | debconf-set-selections | ||
#echo postfix postfix/chattr boolean false | debconf-set-selections | ||
#echo postfix postfix/mailbox_limit string 0 | debconf-set-selections | ||
#echo postfix postfix/newaliases boolean false | debconf-set-selections | ||
echo postfix postfix/mailname string "$MAILNAME" | debconf-set-selections | ||
echo postfix postfix/destinations string "$OTHER_DESTINATIONS" | debconf-set-selections | ||
echo postfix postfix/mynetworks string "$MYNETWORKS" | debconf-set-selections | ||
echo postfix postfix/root_address string "$ROOT_ADDRESS" | debconf-set-selections | ||
|
||
/var/lib/dpkg/info/postfix.postinst configure | ||
export DEBIAN_FRONTEND="noninteractive" | ||
dpkg-reconfigure postfix | ||
echo 'cyrus unix - n n - - pipe' >> /etc/postfix/master.cf | ||
echo ' flags=DRX user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}' >> /etc/postfix/master.cf | ||
echo "mailbox_transport = cyrus" >> /etc/postfix/main.cf | ||
fi | ||
|
||
postfix start-fg |