From 19aee9b59f43b6da9c86f375ae0ed9642d7b0cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Thu, 17 Oct 2024 15:04:32 +0800 Subject: [PATCH] nixbld: send mail from m-labs-intl.com through trump0 --- nixbld-etc-nixos/configuration.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 3927092d..352f9bd1 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -1261,6 +1261,23 @@ in enablePop3Ssl = true; certificateScheme = "acme-nginx"; } // (import /etc/nixos/secret/email_settings.nix); + services.postfix = { + mapFiles."sender_transport" = builtins.toFile "sender_transport" '' + @m-labs-intl.com intltunnel: + ''; + config = { + sender_dependent_default_transport_maps = "hash:/var/lib/postfix/conf/sender_transport"; + }; + masterConfig."intltunnel" = { + type = "unix"; + command = "smtp"; + args = [ + "-o" "inet_interfaces=10.47.3.1" + "-o" "smtp_helo_name=mail.m-labs-intl.com" + "-o" "inet_protocols=ipv4" + ]; + }; + }; services.roundcube = { enable = true; hostName = "mail.m-labs.hk";