Closed jbboehr closed 6 years ago
Thanks for the report! This part is unfortunately notoriously hard to test as it involves setting up the domain records.
Personally I'm still using self signed certs, I need to update my server once I find some time.
Thanks!
Fixed by 3d2f41d
@r-raymond Off-topic, but is the planned 'Multiple domains' feature distinct domains or domain aliases? I'm more interested in the latter, personally.
Distinct domains. What exactly do you mean with domain aliases? It will certainly allow you to alias mail addresses across domain boarders. Basically, it should add more domains into the virtual domains file.
This would allow me to drop my other email servers. It should not be hard to implement, but unfortunately I'm kind of swamped right now. Any help is welcome!
In my current setup (Ubuntu) that I'm trying to migrate to NixOS I have several domains on one server and, for example, user@domain1.com
and user@domain2.com
have the same mailbox. How did I set this up originally? No idea, but if I had done it via nix maybe it would've been easier to figure it out.
That should be unproblematic. You can just add the virtual domains
domain1.com
domain2.com
add a user
user@domain1.com
and set up an alias
user@domain2.com user@domain1.com
to achieve this. However, first multiple domains need to be implemented :)
On 11/09, John Boehr wrote:
In my current setup (Ubuntu) that I'm trying to migrate to NixOS I have several domains on one server and, for example,
user@domain1.com
anduser@domain2.com
have the same mailbox. How did I set this up originally? No idea, but if I had done it via nix maybe it would've been easier to figure it out.-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/r-raymond/nixos-mailserver/issues/21#issuecomment-343097098
Well, I'll take a stab at it, but I'm a Nix and Postfix noob, so don't hold your breath.
Sounds great!
The steps needed are
1) turn cfg.domain into a list or something 2) Replace
vhosts_file = builtins.toFile "vhosts" cfg.domain;
in postfix.nix
That should turn on multidomain support, but various things will be broken then. E.g. the aliases are specified simply by "info" "user1" right now, they will need to also state the domain. Wherever "cfg.domain" is used right now (in postfix, dovecot etc) we should probably just specify "hostname" (from the nixos config), so that user specify whatever they want there.
Oh and testing. It needs a lot of testing, but I can help with that :)
Good luck!
On 11/09, John Boehr wrote:
Well, I'll take a stab at it, but I'm a Nix and Postfix noob, so don't hold your breath.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/r-raymond/nixos-mailserver/issues/21#issuecomment-343240347
Oh, and if you have any questions, feel free to ask
On 11/09, John Boehr wrote:
Well, I'll take a stab at it, but I'm a Nix and Postfix noob, so don't hold your breath.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/r-raymond/nixos-mailserver/issues/21#issuecomment-343240347
@r-raymond I think you missed one: https://github.com/r-raymond/nixos-mailserver/blob/3d2f41dedca389355d2c4a8c125a4d440c4484f7/mail-server/nginx.nix#L38
Now I'm confused, the documentation seems to indicate that this is where the keys and certs are stored. Has this changed? Can anyone confirm this? I'm unfortunately not able before tonight.
@r-raymond @eqyiel The acmeRoot
should be /var/lib/acme/acme-challenge
. This is the webroot where the challenge responses are placed for serving by e.g. nginx. The actual generated certs are placed in /var/lib/acme/${domain}/
(this is what I changed).
Ok thanks for verifying. The description
"Directory to store certificates and keys managed by the ACME service."
seems a little misleading :)
On 11/10, John Boehr wrote:
@r-raymond @eqyiel The
acmeRoot
should be/var/lib/acme/acme-challenge
. This is the webroot where the challenge responses are placed for serving by e.g. nginx. The actual generated certs are placed in/var/lib/acme/${domain}/
(this is what I changed).-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/r-raymond/nixos-mailserver/issues/21#issuecomment-343396800
My bad!
At least on NixOS 17.09, it appears the certs are in
/var/lib/acme/${host}
and not/var/lib/acme/acme-challenge/${host}
and the private key is calledkey.pem
and notprivkey.pem