fix: `setup email restrict` configs should only prepend once by polarathene · Pull Request #4379 · docker-mailserver/docker-mailserver · GitHub
Skip to content

fix: setup email restrict configs should only prepend once#4379

Merged
georglauterbach merged 3 commits into
masterfrom
fix/prepend-checks-once
Mar 1, 2025
Merged

fix: setup email restrict configs should only prepend once#4379
georglauterbach merged 3 commits into
masterfrom
fix/prepend-checks-once

Conversation

@polarathene

@polarathene polarathene commented Feb 20, 2025

Copy link
Copy Markdown
Member

Description

I've noticed that /etc/postfix/main.cf has these checks prepended twice, as the Postfix parameter we update also has the sed call match our own dms_ prefix variant (introduced in #3127).

No known bugs, nor should this fix change anything other than removing the duplicates prepended to smtpd_sender_restrictions, only dms_smtpd_sender_restrictions will be configured with these restrictions.

EDIT: There was a slight mishap with recipient restrictions in this PR. It was resolved in a follow-up PR for the same 15.0.1 release: #4399


Quick reference for maintainers

To configure how the sender addresses of mail is restricted, DMS has a few similar settings due to:

  • smtpd_sender_restrictions = $dms_smtpd_sender_restrictions (main.cf)
  • -o smtpd_sender_restrictions=$mua_sender_restrictions (master.cf)

That translates to the following:

  • smtpd_sender_restrictions is now only from port 25 (inbound)
  • $mua_sender_restrictions is only for ports 587 + 465
  • $dms_smtpd_sender_restrictions is used by all 3 smtpd ports (25, 587, 465).

To keep the same behaviour DMS already has for setup email restrict on all ports, we now only prepend to dms_smtpd_sender_restrictions.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • I have added information about changes made in this PR to CHANGELOG.md

@polarathene polarathene added area/scripts kind/bug/fix A fix (PR) for a confirmed bug labels Feb 20, 2025
@polarathene polarathene self-assigned this Feb 20, 2025
@polarathene

Copy link
Copy Markdown
Member Author

@polarathene

Copy link
Copy Markdown
Member Author

@polarathene polarathene added this to the v15.1.0 milestone Feb 20, 2025
@polarathene polarathene marked this pull request as ready for review February 20, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scripts kind/bug/fix A fix (PR) for a confirmed bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants