diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index f687379..60350cb 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -1249,7 +1249,18 @@ in Restart = "on-failure"; User = "rt"; Group = "rt"; - ExecStart = "${pkgs.bash}/bin/bash -c 'PATH=${pkgs.rt}/bin HOME=/tmp ${pkgs.fetchmail}/bin/fetchmail -f /etc/nixos/secret/rt_fetchmailrc'"; + ExecStart = "${pkgs.bash}/bin/bash -c 'PATH=${pkgs.rt}/bin HOME=/tmp ${pkgs.fetchmail}/bin/fetchmail --pidfile /tmp/.fetchmail.pid -f /etc/nixos/secret/rt_fetchmailrc'"; + }; + }; + systemd.services.rt-fetchmail-intl = { + description = "Fetchmail for RT (intl)"; + wantedBy = [ "multi-user.target" ]; + after = [ "dovecot2.service" ]; + serviceConfig = { + Restart = "on-failure"; + User = "rt"; + Group = "rt"; + ExecStart = "${pkgs.bash}/bin/bash -c 'PATH=${pkgs.rt}/bin HOME=/tmp ${pkgs.fetchmail}/bin/fetchmail --pidfile /tmp/.fetchmail-intl.pid -f /etc/nixos/secret/rt_fetchmailrc_intl'"; }; }; diff --git a/nixbld-etc-nixos/rt.nix b/nixbld-etc-nixos/rt.nix index 30b8e5a..8dda5f5 100644 --- a/nixbld-etc-nixos/rt.nix +++ b/nixbld-etc-nixos/rt.nix @@ -30,7 +30,7 @@ let Set($OwnerEmail, '${cfg.ownerEmail}'); Set($MaxAttachmentSize, 15360000); Set($CheckMoreMSMailHeaders, 1); - Set($RTAddressRegexp, '^(helpdesk|sales)\@(m-labs.hk)$'); + Set($RTAddressRegexp, '^(helpdesk)\@(m-labs.hk|m-labs-intl.com)$'); Set($LoopsToRTOwner, 0); # System (Outgoing mail)