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

postfix: Add submissions option for postfix and test #91691

Merged
2 commits merged into from Jul 6, 2020

Conversation

typetetris
Copy link
Contributor

RFC 8314 suggests, for end user submission of
mails, SMTP over TLS on port 465 should be used.

So let't support running that directly.

Closes #91690

Motivation for this change

Provide an easy way to offer SMTP over TLS via direct nixos configuration option. See
RFC 8314.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@typetetris typetetris requested a review from peti as a code owner June 27, 2020 21:25
@typetetris typetetris changed the title Add submissions option for postfix and test postfix: Add submissions option for postfix and test Jun 27, 2020
RFC 8314 suggests, for end user submission of
mails, SMTP over TLS on port 465 should be used.

Closes NixOS#91690
@ghost
Copy link

ghost commented Jul 6, 2020

I was looking for a solution to this. Thanks for looking into it! I deployed it to my server and it works as expected. The only problem I noticed was some options missing from the submissionsOptions, because the nixos-mailserver module only sets the submissionOptions, but this can be easily added over there.

@ghost ghost merged commit 8af58ed into NixOS:master Jul 6, 2020
@ghost
Copy link

ghost commented Jul 6, 2020

FYI I created an MR based on this for the Simple NixOS Mailserver project:
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/merge_requests/183

elif state == 2 and line.startswith(" ") and "smtpd_tls_security_level=encrypt" in line:
success = True
elif state == 2 and not line.startswith(" "):
state == 3
Copy link
Contributor

Choose a reason for hiding this comment

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

@typetetris Typo: state == 3 instead of state = 3?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

postfix: SMTPS should be supported by direct configuration options in nixos postfix module
2 participants