diff --git a/config/fudo/mail/dovecot.nix b/config/fudo/mail/dovecot.nix index ae994b7..8724f07 100644 --- a/config/fudo/mail/dovecot.nix +++ b/config/fudo/mail/dovecot.nix @@ -232,6 +232,10 @@ in { user = root } + service imap { + vsz_limit = 1024M + } + namespace inbox { separator = "/" inbox = yes diff --git a/fudo/email.nix b/fudo/email.nix index e622728..11c7c40 100644 --- a/fudo/email.nix +++ b/fudo/email.nix @@ -1,15 +1,10 @@ # Fudo email settings { config }: -let - mail-hostname = "france.fudo.org"; - -in { - +{ domain = "fudo.org"; local-domains = [ - "mail.fudo.org" "${config.networking.hostName}" "selby.ca" "mail.selby.ca" diff --git a/hosts/france.nix b/hosts/france.nix index 4158f01..44722a2 100644 --- a/hosts/france.nix +++ b/hosts/france.nix @@ -4,7 +4,7 @@ with lib; let domain = "fudo.org"; hostname = "france.${domain}"; - mail-hostname = hostname; + mail-hostname = "mail.${domain}"; host_ipv4 = "208.81.3.117"; # Use a special IP for git.fudo.org, since it needs to be SSH-able git_ipv4 = "208.81.3.126"; @@ -274,7 +274,21 @@ in { "webmail.test.fudo.org" = { title = "Fudo Webmail"; favicon = "/etc/nixos/static/fudo.org/favicon.ico"; - mail-server = "mail.fudo.org"; + mail-server = mail-hostname; + domain = "fudo.org"; + edit-mode = "Plain"; + database = { + name = "webmail"; + hostname = "localhost"; + user = "webmail"; + password-file = "/srv/webmail/secure/db.passwd"; + }; + }; + + "webmail.fudo.org" = { + title = "Fudo Webmail"; + favicon = "/etc/nixos/static/fudo.org/favicon.ico"; + mail-server = mail-hostname; domain = "fudo.org"; edit-mode = "Plain"; database = { @@ -288,7 +302,20 @@ in { "webmail.test.selby.ca" = { title = "Selby Webmail"; favicon = "/etc/nixos/static/selby.ca/favicon.ico"; - mail-server = "mail.selby.ca"; + mail-server = mail-hostname; + domain = "selby.ca"; + database = { + name = "webmail"; + hostname = "localhost"; + user = "webmail"; + password-file = "/srv/webmail/secure/db.passwd"; + }; + }; + + "webmail.selby.ca" = { + title = "Selby Webmail"; + favicon = "/etc/nixos/static/selby.ca/favicon.ico"; + mail-server = mail-hostname; domain = "selby.ca"; database = { name = "webmail"; @@ -305,7 +332,7 @@ in { hostname = "chat.fudo.org"; site-name = "Fudo Chat"; - smtp-server = "france.fudo.org"; + smtp-server = "mail.fudo.org"; smtp-user = "chat"; smtp-password-file = "/srv/mattermost/secure/smtp.passwd"; database = { @@ -494,6 +521,12 @@ in { ''; }; }; + + # Needed to grab a cert for the mail server. + "mail.fudo.org" = { + enableACME = true; + globalRedirect = "webmail.fudo.org"; + }; }; }; };