feat: improve the email

This commit is contained in:
silver 2023-10-11 10:49:25 +01:00
parent 79fcefb378
commit fd1a70edc9

View file

@ -16,10 +16,10 @@ with lib; let
# thought you could escape racket? # thought you could escape racket?
create_filter = groups: create_filter_join (create_filter_array groups); create_filter = groups: create_filter_join (create_filter_array groups);
create_skynet_email = accounts: (map (account: "${account}@skynet.ie") accounts); create_skynet_email = accounts: mailbox: (map (account: "${account}+${mailbox}@skynet.ie") accounts);
create_skynet_email_admin = create_skynet_email config.skynet.users.admin; create_skynet_email_admin = mailbox: (create_skynet_email config.skynet.users.admin mailbox) ++ ["${mailbox}_int@skynet.ie"];
create_skynet_email_committee = create_skynet_email config.skynet.users.committee; create_skynet_email_committee = mailbox: (create_skynet_email config.skynet.users.committee mailbox) ++ ["${mailbox}_int@skynet.ie"];
in { in {
imports = [ imports = [
./dns.nix ./dns.nix
@ -234,75 +234,21 @@ in {
cfg.domain cfg.domain
]; ];
lmtpSaveToDetailMailbox = "yes";
extraVirtualAliases = { extraVirtualAliases = {
"abuse@skynet.ie" = "abuse@skynet.ie" = create_skynet_email_admin "abuse";
[ "accounts@skynet.ie" = create_skynet_email_committee "accounts";
"abuse_int@skynet.ie" "compsoc@skynet.ie" = create_skynet_email_committee "compsoc";
] "contact@skynet.ie" = create_skynet_email_committee "contact";
++ create_skynet_email_admin; "dbadmin@skynet.ie" = create_skynet_email_admin "dbadmin";
"dnsadm@skynet.ie" = create_skynet_email_admin "dnsadm";
"accounts@skynet.ie" = "hostmaster@skynet.ie" = create_skynet_email_admin "hostmaster";
[ "intersocsrep@skynet.ie" = create_skynet_email_committee "intersocsrep";
"accounts_int@skynet.ie" "mailman@skynet.ie" = create_skynet_email_admin "mailman";
] "security@skynet.ie" = create_skynet_email_admin "security";
++ create_skynet_email_committee; "sysadm@skynet.ie" = create_skynet_email_admin "sysadm";
"webadmin@skynet.ie" = create_skynet_email_admin "webadmin";
"compsoc@skynet.ie" =
[
"compsoc_int@skynet.ie"
]
++ create_skynet_email_committee;
"contact@skynet.ie" =
[
"contact_int@skynet.ie"
]
++ create_skynet_email_committee;
"dbadmin@skynet.ie" =
[
"dbadmin_int@skynet.ie"
]
++ create_skynet_email_admin;
"dnsadm@skynet.ie" =
[
"dnsadm_int@skynet.ie"
]
++ create_skynet_email_admin;
"hostmaster@skynet.ie" =
[
"hostmaster_int@skynet.ie"
]
++ create_skynet_email_admin;
"intersocsrep@skynet.ie" =
[
"intersocsrep_int@skynet.ie"
]
++ create_skynet_email_committee;
"mailman@skynet.ie" =
[
"mailman_int@skynet.ie"
]
++ create_skynet_email_admin;
"security@skynet.ie" =
[
"security_int@skynet.ie"
]
++ create_skynet_email_admin;
"sysadm@skynet.ie" =
[
"sysadm_int@skynet.ie"
]
++ create_skynet_email_admin;
"webadmin@skynet.ie" =
[
"webadmin_int@skynet.ie"
]
++ create_skynet_email_admin;
}; };
# use the letsencrypt certs # use the letsencrypt certs