r-raymond / nixos-mailserver

A complete and Simple Nixos Mailserver
GNU General Public License v3.0
181 stars 27 forks source link

Postfix has wrong hostname #43

Closed oxzi closed 6 years ago

oxzi commented 6 years ago

After setting up a mailserver (tag v2.0.1) and setting my FQDN in mailserver.fqdn, which is $hostname.$domain for me, Postfix was sending mails from $hostname.localdomain. Also configuring services.postfix.hostname = "$hostname.$domain"; solved this issue for me. However, I think that this extra line of configuration shouldn't be necessary and should be done by this mailserver.

Thanks for all the good work!

r-raymond commented 6 years ago

Sorry for the inconvenience! I have no idea how this slipped through the tests. Let me try to reproduce this with the tests. Do you want to to send a patch?

Thanks for trying out SNM!

oxzi commented 6 years ago

I haven't patched SNM at all. My current fix was just adding services.postfix.hostname = "…"; to my configuration.nix. However, I'd write a patch and send you the PR.

r-raymond commented 6 years ago

Awesome. I just added a test which makes sure this remains unbroken in the furture