{ pkgs, config, lib, ... }: 
{
  services.nginx.virtualHosts."mx.${config.domains.p1}" = lib.mkIf config.mailserver.enable {
    enableACME = true;
    forceSSL = true;
    locations."/" = {
      proxyPass = "http://127.0.0.1:1390";
      proxyWebsockets = true;
    };
  };
}