-
-
Notifications
You must be signed in to change notification settings - Fork 103
ssmtp: Add AuthUser and AuthPass options. #144
Conversation
Signed-off-by: Moritz Ulrich <[email protected]>
Signed-off-by: Moritz Ulrich <[email protected]>
This would leave your plain-text password (full access to your google account in case of your gmail example) in the nix-store, readable for every user on the system. |
Both mysql and gogoclient take the path to a file containing the password. Seems like a good solution to me. But this is what mysql.nix says about it: "FIXME: remove this option; it's a really bad idea." Why is that? |
I don't know why that comment is there for mysql, but in general setting-passwords stuff can be problematic. As the password is not allowed to end up in store, this means that it has to be "activated" during system activation or during the startup of a service. As this probably happens more than once (for example on every reboot), it has to be idempotent (should not fail the second time). Also, it might be that the password changed, so it has to be decided if password-changes should work too. For gogoclient this is not an issue, as a new config file is generated on every start. For ssmtp though, it's probably easy (like with gogoclient) so I think it's safe to use. |
Are there any other alternatives to file storage approach? Feels like something nix as a language should solve. |
@iElectric: there was at least one discussion of this kind already, mainly from @MarcWeber http://lists.science.uu.nl/pipermail/nix-dev/2012-July/009567.html |
https://github.com/MarcWeber/nix/tree/experimental/write-file-hashed But please be aware that it introduces kind of "not garbage collected state directory you do not copy with nix-copy-closure" Its not perfect, but solutions based on it should be easy to review. |
As far as I understand, that's impure and basing services with that is not an option. I'd recommend merging this one (in contrast to other services currently doing the same) and discuss this at NixOS/nix#8 |
I'm merging this one. We have password usage all over MixOs, but this shouldn't stop adding a new one. Once we fix this in Nix, we can go over existing services and make sure they use more secure way of storing passwords. |
ssmtp: Add AuthUser and AuthPass options.
Add AuthUser and AuthPass options for ssmtp.
These can be used to enable all users to send mail via a simple SMTP server like smtp.gmail.com.