base/postfix: remove, base:nullmailer: init #151

Merged
oysteikt merged 1 commits from base-bye-postfix-nullmailer-is-my-new-best-friend into main 2026-07-22 14:21:50 +02:00
Owner
Fixes: https://git.pvv.ntnu.no/Drift/issues/issues/384
felixalb requested changes 2026-07-22 11:13:15 +02:00
Dismissed
@@ -0,0 +4,4 @@
enable = true;
config = {
adminaddr = "root@pvv.ntnu.no";
Owner

Insta-resolve if too irrelevant, it is a digression, but should we label this better, like use root+${config.networking.hostName} or something for easy sorting?

Insta-resolve if too irrelevant, it is a digression, but should we label this better, like use `root+${config.networking.hostName}` or something for easy sorting?
Author
Owner

I do think you get this info from the address in the From: field, but sure?

I do think you get this info from the address in the `From:` field, but sure?
Owner

Sure, it is probably more standard/predictable to keep this as is, oops

Sure, it is probably more standard/predictable to keep this as is, oops
felixalb marked this conversation as resolved
@@ -0,0 +9,4 @@
defaulthost = "pvv.ntnu.no";
me = lib.mkDefault config.networking.fqdn;
remotes = lib.mkDefault "smtp.pvv.ntnu.no smtp port=587 starttls";
Owner

Don't use starttls if it is at all possible to use TLS properly. See https://wiki.pvv.ntnu.no/wiki/Tjenester/Epost/Autentisert_SMTP and https://datatracker.ietf.org/doc/html/rfc8314, use SMTP over TLS on port 465.

Don't use starttls if it is at all possible to use TLS properly. See https://wiki.pvv.ntnu.no/wiki/Tjenester/Epost/Autentisert_SMTP and https://datatracker.ietf.org/doc/html/rfc8314, use SMTP over TLS on port 465.
Author
Owner

I took this from the suggested config in d59a3f6ec0/hosts/bekkalokk/services/well-known/root/autoconfig/mail/config-v1.1.xml, should we update this file as well? I'll make a separate issue

I took this from the suggested config in https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/commit/d59a3f6ec090d2cdb17ded5d553ae233af808817/hosts/bekkalokk/services/well-known/root/autoconfig/mail/config-v1.1.xml, should we update this file as well? I'll make a separate issue
Owner

Yes, I think we should always advertise SSL/TLS from the beginning when possible.

Yes, I think we should always advertise SSL/TLS from the beginning when possible.
oysteikt marked this conversation as resolved
@@ -9,3 +3,1 @@
remotes = "mail.pvv.ntnu.no smtp --port=25";
};
};
services.nullmailer.enable = true;
Owner

Is this line necessary, is nullmailer not enabled by default already through /base/?

Is this line necessary, is nullmailer not enabled by default already through /base/?
Author
Owner

It is not, I left it as a sort of assertion. If someone does anything that ends up disabling nullmailer, it should cause build-time problems for temmie, not runtime problems. I could rewrite it as a nix module assertion instead if that is clearer?

It is not, I left it as a sort of assertion. If someone does anything that ends up disabling nullmailer, it should cause build-time problems for temmie, not runtime problems. I could rewrite it as a nix module assertion instead if that is clearer?
Owner

Putting it in the module sounds even weirder, but why would someone do that, what plausible situation are we guarding against?

Putting it in the module sounds even weirder, but why would someone do that, what plausible situation are we guarding against?
Author
Owner

Sorry, I don't think I was clear. Should I rewrite the line as the following?

assertions = [{
  assertion = services.nullmailer.enable;
  message = "nullmailer needs to be enabled in order for temmie userweb to work correctly";
}];

I'm trying to enforce a strict dependency for temmie on nullmailer so that it will be obvious if someone tries to adjust the base in the future. A sort of "sure, go ahead and remove nullmailer or switch it out, but do make sure temmie userweb still works" type of check.

Sorry, I don't think I was clear. Should I rewrite the line as the following? ``` assertions = [{ assertion = services.nullmailer.enable; message = "nullmailer needs to be enabled in order for temmie userweb to work correctly"; }]; ``` I'm trying to enforce a strict dependency for temmie on nullmailer so that it will be obvious if someone tries to adjust the base in the future. A sort of "sure, go ahead and remove nullmailer or switch it out, but do make sure temmie userweb still works" type of check.
Owner

Sure, if we need to require that specifically, disallowing other sendmail implementations, that looks good

Sure, if we need to require that specifically, disallowing other sendmail implementations, that looks good
Author
Owner

[...] if we need to require that specifically, disallowing other sendmail implementations [...]

I don't wanna bet on it at least

> [...] if we need to require that specifically, disallowing other sendmail implementations [...] I don't wanna bet on it at least
felixalb marked this conversation as resolved
oysteikt force-pushed base-bye-postfix-nullmailer-is-my-new-best-friend from 361a23f4d3 to e44a7f860a 2026-07-22 14:07:50 +02:00 Compare
oysteikt added 1 commit 2026-07-22 14:12:06 +02:00
base/postfix: remove, base:nullmailer: init
Eval nix flake / evals (pull_request) Successful in 7m30s
Build topology graph / evals (push) Successful in 2m14s
Eval nix flake / evals (push) Successful in 9m11s
1c4e8e7662
oysteikt force-pushed base-bye-postfix-nullmailer-is-my-new-best-friend from e44a7f860a to 1c4e8e7662 2026-07-22 14:12:06 +02:00 Compare
oysteikt requested review from felixalb 2026-07-22 14:12:23 +02:00
felixalb approved these changes 2026-07-22 14:17:22 +02:00
felixalb left a comment
Owner

image.png

![image.png](/attachments/6f5d1f27-de20-4b31-997d-3594d1060149)
292 KiB
Author
Owner

Meg stein

Meg stein
oysteikt merged commit 1c4e8e7662 into main 2026-07-22 14:21:50 +02:00
oysteikt deleted branch base-bye-postfix-nullmailer-is-my-new-best-friend 2026-07-22 14:21:51 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Drift/pvv-nixos-config#151