mailserver2 / mailserver

Simple and full-featured mail server using Docker
https://store.docker.com/community/images/mailserver2/mailserver
MIT License
133 stars 28 forks source link

Upgrade to postfix 3.5.23 or 3.7.9 #60

Closed DrMurx closed 6 months ago

DrMurx commented 6 months ago

Postfix before 3.5.23 and 3.7.9 are affected by "SMTP Smuggling", see https://www.postfix.org/smtp-smuggling.html

@SaraSmiseth Would you mind to release a build with upgraded debian-mail-overlay?

SaraSmiseth commented 6 months ago

After merging #58 we can release a new image. But we have to fix the tests first.

AndrewSav commented 6 months ago

We are pulling postfix from debian repo, the current version there is 3.7.9 so we should be good after merging https://github.com/mailserver2/mailserver/pull/58

diroots commented 6 months ago

https://github.com/mailserver2/mailserver/actions/runs/7457756574/job/20290497408?pr=58#step:3:166 postfix 3.7.9 from bookworm-updates repo

diroots commented 6 months ago

@SaraSmiseth @AndrewSav the postfix page says that there are new settings to be defined to actually mitigate the SMTP smuggling : https://www.postfix.org/smtp-smuggling.html#long

    smtpd_forbid_bare_newline = yes
    smtpd_forbid_bare_newline_exclusions = $mynetworks

so i think an update to https://github.com/mailserver2/mailserver/blob/master/rootfs/etc/postfix/main.cf is needed in order to add these params to effectively enable this feature.

or maybe advise to enable this feature using the overriding of postfix config https://github.com/mailserver2/mailserver#override-postfix-configuration

(tbh, idk what is best, to enable it by default or not)

diroots commented 6 months ago
(STG) root@mailXX:/path/to/stack docker-compose exec mailserver postconf | grep forbid_bare
smtpd_forbid_bare_newline = no
smtpd_forbid_bare_newline_exclusions = $mynetworks

by default, the exclusions are here, the feature is set to 'no'

AndrewSav commented 6 months ago

Oh good catch! I missed that!

DrMurx commented 5 months ago

Thanks for your great work, @SaraSmiseth , @AndrewSav & @diroots