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

[TODO]: Consider Postfix / Dovecot alternative deps #3787

Open
polarathene opened this issue Jan 17, 2024 · 0 comments
Open

[TODO]: Consider Postfix / Dovecot alternative deps #3787

polarathene opened this issue Jan 17, 2024 · 0 comments
Labels
area/configuration (file) area/scripts kind/improvement Improve an existing feature, configuration file or the documentation meta/help wanted The OP requests help from others - chime in! :D service/dovecot service/postfix service/security/dkim-dmarc-spf stale-bot/ignore Indicates that this issue / PR shall not be closed by our stale-checking CI

Comments

@polarathene
Copy link
Member

polarathene commented Jan 17, 2024

Subject

Something else that requires developers attention

Description

This is a tracking issue related to information shared in this comment.


Changes

Amavis:

  • Consider configuring to use a milter instead via the amavisd-milter package.
    • Presently Amavis is configured as a content_filter (processes mail post-queuing, unlike milters which are pre-queue). Mail arrives at smtpd (port 25), content filter directs it to the smtpd-amavis unix socket / transport defined in appended master.cf, which then directs to the destination (main.cf:content_filter = transport:destination) configured as localhost:10024 (Amavis service), which resubmits mail to localhost:10025 to return it back to Postfix.
    • There is some reasoning to prefer Amavis as a content_filter instead of milter.
    • Amavis config may need a revision based on the content filter and milter Postfix docs examples.
      • For Amavis config itself, there is this article which notes an issue with DKIM and an important difference between Postfix and Amavis mynetworks settings not being equivalent in behaviour.
      • That article also opts for the milter on port 25, but also uses the content filter on submission ports (whereas DMS does not have spam filtering for authenticated submissions, trusting the user isn't accidentally/intentionally sending spam/malware).

Dovecot:

  • When v2.4 / 3.0 is released and DMS can update to it, switch from fts-xapian to flatcurve.
  • Dovecot diverges by major version going forward with CE (2.4) and Pro (3.0). Breaking changes detailed here.

Postfix:

  • Upgrade postsrsd to 1.12 / 2. Although this is less important once Docker Engine + Containerd releases drop LimitNOFILE=infinity.
  • Consider switching from policyd-spf to pyspf-milter.

Relevant snippets from linked comment

Amavis:

  • Instead of check_policy_service integration to Postfix, amavisd-milter package could be used instead.

Dovecot:

Postfix:

  • postsrsd (1.10)
    • There is a bug within common container environments that have containerd or similar service on the host configured with LimitNOFILE=infinity where fs.nr_open is a value of 2^30 instead of 2^20 (Debian).
      • That bug was fixed in Aug 2022 but only available with PostSRSd v1.12 / v2.
      • Thus users of this feature in DMS may need to explicitly configure the --ulimit to 1024:524288 (systemd implicit default since v240).
      • The fix also requires at least glibc of 2.35, which Debian 12 provides with glibc 2.36. Docker host kernel is required to be >= 5.9.
      • The bug described will be partially resolved with the workaround effectively becoming default in Docker Engine v25, but Docker must release with containerd release that also includes the change (presumably containerd 2.0). Both have the change merged in 2023, just a long wait for that to officially land in a release.
  • postfix-policyd-spf-python (2.9.2 => 3.04)
@polarathene polarathene added meta/help wanted The OP requests help from others - chime in! :D service/dovecot service/postfix area/scripts kind/improvement Improve an existing feature, configuration file or the documentation area/configuration (file) stale-bot/ignore Indicates that this issue / PR shall not be closed by our stale-checking CI service/security/dkim-dmarc-spf labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration (file) area/scripts kind/improvement Improve an existing feature, configuration file or the documentation meta/help wanted The OP requests help from others - chime in! :D service/dovecot service/postfix service/security/dkim-dmarc-spf stale-bot/ignore Indicates that this issue / PR shall not be closed by our stale-checking CI
Projects
None yet
Development

No branches or pull requests

1 participant