diff --git a/nixos/queen/configuration.nix b/nixos/queen/configuration.nix index e407b63..085a594 100644 --- a/nixos/queen/configuration.nix +++ b/nixos/queen/configuration.nix @@ -19,6 +19,7 @@ ./postgres.nix ./nextcloud.nix ./mail-server.nix + ./webmail.nix ./gotosocial.nix ./akkoma.nix ]; diff --git a/nixos/queen/mail-server.nix b/nixos/queen/mail-server.nix index d0cbd10..4c2bd2b 100644 --- a/nixos/queen/mail-server.nix +++ b/nixos/queen/mail-server.nix @@ -6,6 +6,7 @@ pkgs, ... }: { + #The thing you want for multiple domains is SNI, I don't know how to set that up imports = [ (builtins.fetchTarball { # Pick a release version you are interested in and set its hash, e.g. @@ -60,6 +61,29 @@ }; }; + mailboxes = { + Inbox = { + auto = "subscribe"; + specialUse = "Inbox"; + }; + Drafts = { + auto = "subscribe"; + specialUse = "Drafts"; + }; + Junk = { + auto = "subscribe"; + specialUse = "Junk"; + }; + Sent = { + auto = "subscribe"; + specialUse = "Sent"; + }; + Trash = { + auto = "no"; + specialUse = "Trash"; + }; + }; + rejectRecipients = [ "no-reply@nextcloud.gladtherescake.eu" "no-reply@akkoma.gladtherescake.eu" diff --git a/nixos/queen/webmail.nix b/nixos/queen/webmail.nix new file mode 100644 index 0000000..4369b22 --- /dev/null +++ b/nixos/queen/webmail.nix @@ -0,0 +1,25 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; { + services.roundcube = { + enable = true; + # this is the url of the vhost, not necessarily the same as the fqdn of + # the mailserver + hostName = "mail.lillianviolet.dev"; + extraConfig = '' + # starttls needed for authentication, so the fqdn required to match + # the certificate + $config['smtp_server'] = "tls://${config.mailserver.fqdn}"; + $config['smtp_user'] = "%u"; + $config['smtp_pass'] = "%p"; + ''; + }; + + services.nginx.enable = true; + + networking.firewall.allowedTCPPorts = [80 443]; +}