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

exim: add DMARC support #93357

Merged
merged 3 commits into from Jul 26, 2020
Merged

Conversation

ajs124
Copy link
Member

@ajs124 ajs124 commented Jul 17, 2020

Motivation for this change

We're running this.

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.

Copy link
Member

@dasJ dasJ left a comment

Choose a reason for hiding this comment

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

LGTM, running this in production right now

@ofborg ofborg bot requested a review from dasJ July 17, 2020 18:03
pkgs/development/libraries/libopendmarc/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/libopendmarc/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/libopendmarc/default.nix Outdated Show resolved Hide resolved
{ stdenv, fetchFromGitHub, autoreconfHook, libmilter }:

stdenv.mkDerivation rec {
pname = "libopendmarc";
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not just a library, but also contains useful standalone programs. So, it is probably better to call this derivation opendmarc. I propose to move it to pkgs/tools/networking/mail/opendmarc. Then you could also add

  outputs = [ "bin" "dev" "out" ];

After the src attribute, so that e.g. exim doesn't get the headers or binaries in its closure. Or that if someone installs the binary output that they don't get the headers.

Copy link
Member Author

Choose a reason for hiding this comment

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

Splitting leads to a dependency cycle, because something in share/doc in out references stuff in bin.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's only in the documentation. So, the references could be removed, or you could make documentation a separate output:

  outputs = [ "bin" "dev" "out" "doc" ];

In this case that would be the most elegant solution.

Copy link
Member Author

Choose a reason for hiding this comment

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

done. I think this will mainly be used as a library, which is why I chose development/libraries instead of tools. Lots of "libraries", e.g. openssl, ship tools and example binaries, but they're still in this folder.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack on the directory. But upstream calls the project opendmarc and not libopendmarc, so to me opendmarc is more appropriate as pname and the directory name (thus development/libraries/opendmarc).

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 I also changed the name of the attribute in all-packages.nix.

@ajs124 ajs124 force-pushed the feat/exim-dmarc branch 2 times, most recently from 74741c8 to 236116c Compare July 20, 2020 13:36
@danieldk
Copy link
Contributor

Thanks for making all the changes. Looks almost good to go, I just noticed that some of the opendmarc utilities need shebang patching (and possibly wrapping, I didn't check if the modules are included in the Perl distribution):

bash: results/opendmarc/bin/opendmarc-expire: /usr/bin/perl: bad interpreter: No such file or directory
bash: results/opendmarc/bin/opendmarc-import: /usr/bin/perl: bad interpreter: No such file or directory
bash: results/opendmarc/bin/opendmarc-params: /usr/bin/perl: bad interpreter: No such file or directory
bash: results/opendmarc/bin/opendmarc-reports: /usr/bin/perl: bad interpreter: No such file or directory

Copy link
Contributor

@danieldk danieldk left a comment

Choose a reason for hiding this comment

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

LGTM. Very nice additional feature to have in Exim 👍 .

Result of nixpkgs-review pr 93357 1

2 packages built:
- exim
- opendmarc

@danieldk danieldk merged commit bf48c39 into NixOS:master Jul 26, 2020
@ajs124 ajs124 deleted the feat/exim-dmarc branch July 26, 2020 12:23
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.

None yet

3 participants