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

ssmtp: use the authPassFile option instead of authPass #24331

Merged
merged 2 commits into from Apr 8, 2017

Conversation

basvandijk
Copy link
Member

This gives users the option of storing the smtp password outside the world-readable Nix store.

This is part of: #24288.

I tested this by configuring ssmtp to send mail via my mandrill account:

{
  networking.defaultMailServer = {
    directDelivery = true;
    root           = "xxx";
    authUser       = "xxx";
    authPassFile   = "xxx"; # I also tested it with: authPass = "xxx";
    hostName       = "smtp.mandrillapp.com";
    useSTARTTLS    = true;
  };
}

and then sending some mail.

I also tested it by setting authPassFile to a non-existing file or a file with too restrictive permissions. In those cases the correct error message is printed:

sendmail: Could not open the AuthPassFile xxx

Setting authPassFile to an empty file correctly produces the following error message:

sendmail: Error while reading a line from the AuthPassFile xxx, or it is empty

@mention-bot
Copy link

@basvandijk, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @abbradar and @the-kenny to be potential reviewers.

@@ -10,6 +10,8 @@ stdenv.mkDerivation {
sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
};

patches = [ ./ssmtp_support_AuthPassFile_parameter.patch ];
Copy link
Member

Choose a reason for hiding this comment

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

Can you add yourself as maintainer, when adding patches likes this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Make sense. I just added myself. I will also try to upstream this patch to Debian.

@basvandijk basvandijk force-pushed the ssmtp-AuthPassFile branch 2 times, most recently from 960b114 to 7ced938 Compare March 26, 2017 17:35
This gives users the option of storing the authPass outside the
world-readable Nix store.
@basvandijk
Copy link
Member Author

Any chance this can be merged? I would like to make some progress on #24288.

@Mic92 Mic92 merged commit cb6d1fd into NixOS:master Apr 8, 2017
@Mic92
Copy link
Member

Mic92 commented Apr 8, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants