Skip to content

ssmtp: use the authPassFile option instead of authPass#24331

Merged
Mic92 merged 2 commits intoNixOS:masterfrom
LumiGuide:ssmtp-AuthPassFile
Apr 8, 2017
Merged

ssmtp: use the authPassFile option instead of authPass#24331
Mic92 merged 2 commits intoNixOS:masterfrom
LumiGuide:ssmtp-AuthPassFile

Conversation

@basvandijk
Copy link
Copy Markdown
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
Copy Markdown

@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.

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants