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

debian stretch slim #784

Merged
merged 9 commits into from
Dec 31, 2017
Merged

Conversation

mwlczk
Copy link
Contributor

@mwlczk mwlczk commented Dec 28, 2017

switch to debian:stretch-slim:

  • first step correct the testdata, as newer packages are more strict
    about the mail-structure.

  • add missing build-step in make

  • clean the userdb aswell

  • use timeout of netcat (nc -w), as postgrey would not close the connection

  • there is 2 extra mail-log-files (mail.info and mail.warn) -> count only mail.log

  • cosmetic: use "" instead of ''

new image benefits:

  • smaller size (52MB less)
  • 0 CVEs compared to 11 CVEs in ubuntu 16.04 Image

better backport situation:

  • postfix 3.1.6 vs 3.1.0
  • fail2ban 0.9.6 vs 0.9.3
  • openssl 1.1.0f vs 1.0.2g
  • dovecot 2.2.27 vs 2.2.22
    ....

changes in Dockerfile and configfiles needed because of stretch-slim:

  • add missing gnupg and iproute2 package

  • remove non-free rar, unrar-free should do

  • rsyslog does not add syslog user and has different conf-structure

  • pyzor command discover was deprecated and is missing in the new
    stretch package

  • dovecot does not know SSLv2 anymore. removed because of warnings in
    log

  • iptables does not know imap3, IMAP working group chose imap2 in favor
    of imap3

  • s. following commits aswell

mwlczk added 3 commits December 28, 2017 10:04
 - first step correct the testdata, as newer packages are more strict
about the mail-structure.
 - add missing build-step to make
 - clean the userdb aswell
 - use timeout of netcat, as postgrey would not close the connection
 - there is 2 extra mail-logs -> assert_output 5
 - cosmetic: use "" instead of ''
new image:
 - smaller size
 - 0 CVEs compared to 11 CVEs in ubuntu 16.04 Image
better backport situation
 - postfix 3.1.6 vs 3.1.0
 - fail2ban 0.9.6 vs 0.9.3
 ...
changes needed because of stretch-slim:
- add missing gnupg and iproute2 package
- remove non-free rar, unrar-free should do
- rsyslog does not add syslog user and has different conf-structure
- pyzor command discover was deprecated and is missing in the new
stretch package

- dovecot does not know SSLv2 anymore. removed because of warnings in
log

- iptables does not know imap3, IMAP working group chose imap2 in favor
of imap3
@mwlczk
Copy link
Contributor Author

mwlczk commented Dec 28, 2017

The tests run fine on my machine. Need to look into it, why Travis breaks. They changed the architecture mid-December though. Any hints on that would be great

@mwlczk mwlczk changed the title Stretch slim debian stretch slim Dec 28, 2017
@mwlczk mwlczk closed this Dec 28, 2017
@mwlczk
Copy link
Contributor Author

mwlczk commented Dec 28, 2017

retrigger travis ci to get a closer look into the build.

@mwlczk mwlczk reopened this Dec 28, 2017
@mwlczk
Copy link
Contributor Author

mwlczk commented Dec 28, 2017

this is odd: travis might have some caching (or no-cache) issues.
First build run had 9 failures.
Second build run had only 1 failure - but no source code has been changed in between.

Gonna hunt that last failure down now.

SSLv2 seems to be a not known protocol anymore - good!
@mwlczk mwlczk closed this Dec 28, 2017
@mwlczk
Copy link
Contributor Author

mwlczk commented Dec 28, 2017

One more Travis try

@mwlczk mwlczk reopened this Dec 28, 2017
@mwlczk mwlczk closed this Dec 28, 2017
@mwlczk
Copy link
Contributor Author

mwlczk commented Dec 28, 2017

Last two Travis runs exit at different tests.

@mwlczk mwlczk reopened this Dec 28, 2017
mwlczk added 3 commits December 28, 2017 19:59
make this test more stable. there might be more than only one mail.log
(mail.info, mail.warn, ...)
 new openssl 1.1.0 needs stronger ciphers, removed some weekers ones.
Please, look through the new list of cipher! this needs to be done in
another commit for all other SSL/TLS-Endpoints aswell.
let our server pre-empt the cipher list.
Did a read through, wwwDOTpostfixDOTorg/FORWARD_SECRECY_READMEDOThtml
and
wwwDOTpostfixDOTorg/TLS_READMEDOThtml
@mwlczk mwlczk closed this Dec 29, 2017
@mwlczk
Copy link
Contributor Author

mwlczk commented Dec 29, 2017

Travis makes me wonder. If I seemingly fix one bug/test, it fails another test, which is executed earlier in the queue and passed all the times before.

@mwlczk mwlczk reopened this Dec 29, 2017
…w and independent but identical container. many other test on the main 'mail' container might interfere here.
@johansmitsnl
Copy link
Contributor

@mwlczk First of great PR!

A very good contribution, myself also tried to change this image to Debian because of better backport support that lacks in Ubuntu sometimes, couldn't agree more.

Sometimes travis is busy and due to the amount of containers that are started some tests are not yet ready to be tested and this gives sometimes some mixed test results. This is a improvement that needs to be applied to this project #324.

Looking forward to merging this PR but some questions:

  • Could you remove commented old code?
  • Besides the tests are you using the PR live?
  • Any notes that should be considered when merging, todo's or ...?

Dockerfile Outdated
@@ -60,7 +62,7 @@ RUN apt-get update -q --fix-missing && \
postfix-pcre \
postfix-policyd-spf-python \
pyzor \
rar \
# rar \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the line if not used

Dockerfile Outdated
@@ -177,8 +180,9 @@ RUN sed -i -r "/^#?compress/c\compress\ncopytruncate" /etc/logrotate.conf && \
chown -R clamav:root /var/log/mail/clamav.log && \
touch /var/log/mail/freshclam.log && \
chown -R clamav:root /var/log/mail/freshclam.log && \
sed -i -r 's|/var/log/mail|/var/log/mail/mail|g' /etc/rsyslog.d/50-default.conf && \
sed -i -r 's|;auth,authpriv.none|;mail.none;mail.error;auth,authpriv.none|g' /etc/rsyslog.d/50-default.conf && \
# no separate 50-default.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the line if not used

test/tests.bats Outdated
run docker exec mail_with_postgrey /bin/sh -c "nc 0.0.0.0 10023 < /tmp/docker-mailserver-test/nc_templates/postgrey_whitelist.txt"
sleep 8
run docker exec mail_with_postgrey /bin/sh -c "nc -w 8 0.0.0.0 10023 < /tmp/docker-mailserver-test/nc_templates/postgrey_whitelist.txt"
# sleep 8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the line if not used

@mwlczk
Copy link
Contributor Author

mwlczk commented Dec 31, 2017

@johansmitsnl

  • removed commented old code
  • am using this PR live
  • Notes: We should have a look at the cipher-suites for all
    TLS-Endpoints (smtp, smtpd, imaps, pop3s, ...), because newer
    package (e.g. openssl) might cause problems with older stuff.
    Anyway we should keep an eye to update them in a next PR.

@johansmitsnl johansmitsnl merged commit 49b3867 into docker-mailserver:master Dec 31, 2017
@mwlczk mwlczk deleted the stretch-slim branch January 1, 2018 15:34
@mwlczk mwlczk mentioned this pull request Feb 12, 2018
@17Halbe 17Halbe mentioned this pull request Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants