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

msmtp: support passwordeval without final '\n' #45438

Merged
merged 1 commit into from Aug 22, 2018

Conversation

rycee
Copy link
Member

@rycee rycee commented Aug 21, 2018

Motivation for this change

This applies an upstream patch (to be included in a future version of msmtp) that removes the requirement for passwordeval commands to print a \n character after the password. I'm adding this patch primarily for the benefit of the Home Manager email infrastructure, which promotes password commands that do not print a final newline.

I have tried the functionality of the msmtp tool with this patch applied and it sends mail just fine.

Maintainer CC: @garbas @peterhoeg

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

This applies an upstream patch that removes the requirement for
passwordeval commands to print a `\n` character after the password.
@rycee
Copy link
Member Author

rycee commented Aug 21, 2018

@teto This should allow some simplification of the msmtp Home Manager module once merged.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: msmtp

Partial log (click to expand)

/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8/bin/msmtpq: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/6v88ick1cxnn5g91m8qrrqww0lrlr27x-bash-4.4-p23/bin/bash"
/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8/bin/msmtp-queue: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/6v88ick1cxnn5g91m8qrrqww0lrlr27x-bash-4.4-p23/bin/bash"
/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpq/msmtpq: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/6v88ick1cxnn5g91m8qrrqww0lrlr27x-bash-4.4-p23/bin/bash"
/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpq/msmtp-queue: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/6v88ick1cxnn5g91m8qrrqww0lrlr27x-bash-4.4-p23/bin/bash"
/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpqueue/msmtp-listqueue.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/6v88ick1cxnn5g91m8qrrqww0lrlr27x-bash-4.4-p23/bin/bash"
/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpqueue/msmtp-enqueue.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/6v88ick1cxnn5g91m8qrrqww0lrlr27x-bash-4.4-p23/bin/bash"
/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpqueue/msmtp-runqueue.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/6v88ick1cxnn5g91m8qrrqww0lrlr27x-bash-4.4-p23/bin/bash"
/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8/share/doc/msmtp/scripts/set_sendmail/set_sendmail.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/6v88ick1cxnn5g91m8qrrqww0lrlr27x-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8...
/nix/store/m1z0giv396g4yp49wvayvkh39das3cgg-msmtp-1.6.8

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: msmtp

Partial log (click to expand)

/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8/share/doc/msmtp/scripts/set_sendmail/set_sendmail.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9hsgp158m12qi4dsvz6x6dxy5rkiind9-bash-4.4-p23/bin/bash"
/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpq/msmtpq: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9hsgp158m12qi4dsvz6x6dxy5rkiind9-bash-4.4-p23/bin/bash"
/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpq/msmtp-queue: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9hsgp158m12qi4dsvz6x6dxy5rkiind9-bash-4.4-p23/bin/bash"
/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpqueue/msmtp-listqueue.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9hsgp158m12qi4dsvz6x6dxy5rkiind9-bash-4.4-p23/bin/bash"
/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpqueue/msmtp-enqueue.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9hsgp158m12qi4dsvz6x6dxy5rkiind9-bash-4.4-p23/bin/bash"
/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8/share/doc/msmtp/scripts/msmtpqueue/msmtp-runqueue.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9hsgp158m12qi4dsvz6x6dxy5rkiind9-bash-4.4-p23/bin/bash"
/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8/bin/msmtp-queue: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9hsgp158m12qi4dsvz6x6dxy5rkiind9-bash-4.4-p23/bin/bash"
/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8/bin/msmtpq: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/9hsgp158m12qi4dsvz6x6dxy5rkiind9-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8...
/nix/store/52ncq8j6ai42ygnkd18zg48fafb0lf50-msmtp-1.6.8

@xeji
Copy link
Contributor

xeji commented Aug 21, 2018

Would this patch break existing configs because they still print a \n after the password?

@rycee
Copy link
Member Author

rycee commented Aug 22, 2018 via email

@xeji xeji merged commit 0cda7b2 into NixOS:master Aug 22, 2018
@rycee rycee deleted the msmtp/support-passwdeval-without-nl branch August 23, 2018 19:35
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