postfix working for sending signed mail to itself.

not tested:
- sending to root
- receiving from an external domain
- sending to an external domain (definitely won't work, since the DNS keys aren't correct anymore)
This commit is contained in:
Colin 2022-04-28 07:22:03 +00:00
parent b627957822
commit 5be2afcdd8

View File

@ -1,6 +1,29 @@
{ config, pkgs, lib, ... }:
{
#services.postfix.enable = true;
services.postfix.enable = true;
services.postfix.hostname = "mx.uninsane.org";
services.postfix.origin = "uninsane.org";
services.postfix.destination = ["localhost" "uninsane.org"];
services.postfix.virtual = ''
@uninsane.org colin
'';
services.postfix.extraConfig = ''
# smtpd_milters = local:/run/opendkim/opendkim.sock
smtpd_milters = inet:localhost:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept
'';
services.opendkim.enable = true;
services.opendkim.domains = "csl:uninsane.org";
# we use a custom (inet) socket, because the default perms
# of the unix socket don't allow postfix to connect
services.opendkim.socket = "inet:8891@localhost";
# selectors can be used to disambiguate sender machines.
# keeping this the same as the hostname seems simplest
services.opendkim.selector = "mx";
}