From e3578011a5d5e3ed6656fcc3823e729854ea9e91 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 11 Aug 2021 10:54:24 +0800 Subject: [PATCH] rt: email setup WIP --- nixbld-etc-nixos/configuration.nix | 2 ++ nixbld-etc-nixos/rt.nix | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 85575b1..9457f43 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -764,6 +764,8 @@ in ownerEmail = "sb" + "@m-labs.hk"; commentAddress = "helpdesk" + "@m-labs.hk"; correspondAddress = "helpdesk" + "@m-labs.hk"; + sendmailPath = "${pkgs.msmtp}/bin/msmtp"; + sendmailArguments = ["-t" "-C" "/etc/nixos/secret/rt_msmtp.conf"]; }; system.stateVersion = "21.05"; diff --git a/nixbld-etc-nixos/rt.nix b/nixbld-etc-nixos/rt.nix index 730dbbc..74045c5 100644 --- a/nixbld-etc-nixos/rt.nix +++ b/nixbld-etc-nixos/rt.nix @@ -35,10 +35,11 @@ let Set($OwnerEmail, '${cfg.ownerEmail}'); Set($MaxAttachmentSize, 15360000); Set($CheckMoreMSMailHeaders, 1); + Set($RTAddressRegexp, '^(helpdesk|sales)\@(m-labs.hk)$'); Set($LoopsToRTOwner, 0); # System (Outgoing mail) - Set($SetOutgoingMailFrom, '${cfg.ownerEmail}'); + Set($SetOutgoingMailFrom, 'helpdesk@m-labs.hk'); # System (Sendmail configuration) Set($SendmailPath, '${cfg.sendmailPath}');