email: badly obfuscate addresses

feat/authelia
Benjamin Yule Bädorf 2024-03-28 17:18:18 +01:00
parent b9f0063993
commit cb4c54ce38
Signed by: b12f
GPG Key ID: 729956E1124F8F26
10 changed files with 19 additions and 17 deletions

View File

@ -13,6 +13,7 @@
deploy = import ./deploy.nix { inherit inputs lib; }; deploy = import ./deploy.nix { inherit inputs lib; };
addLocalHostname = callLibs ./add-local-hostname.nix; addLocalHostname = callLibs ./add-local-hostname.nix;
recursiveMerge = callLibs ./recursive-merge.nix; recursiveMerge = callLibs ./recursive-merge.nix;
mkEmailAddress = account: domain: account + "@" + domain;
}; };
}; };
} }

View File

@ -2,6 +2,7 @@
lib, lib,
config, config,
pkgs, pkgs,
flake,
... ...
}: }:
with lib; let with lib; let
@ -15,7 +16,7 @@ with lib; let
realName = psCfg.user.fullName; realName = psCfg.user.fullName;
signature = { signature = {
showSignature = "append"; showSignature = "append";
text = builtins.readFile (./.config/neomutt + "/${address}.signature"); text = builtins.readFile (./.config/neomutt + "/${builtins.replaceStrings ["@"] ["_"] address}.signature");
}; };
folders = { folders = {
@ -84,9 +85,9 @@ in {
accounts.email = { accounts.email = {
maildirBasePath = "/home/${psCfg.user.name}/Mail"; maildirBasePath = "/home/${psCfg.user.name}/Mail";
accounts = lib.lists.foldr (item: set: (set // { "${item.address}" = generateMailAccount item; })) {} [ accounts = with flake.self.lib; lib.lists.foldr (item: set: (set // { "${item.address}" = generateMailAccount item; })) {} [
{ {
address = "hello@benjaminbaedorf.eu"; address = mkEmailAddress "hello" "benjaminbaedorf.eu";
host = "mail.hosting.de"; host = "mail.hosting.de";
config.primary = true; config.primary = true;
} }
@ -95,32 +96,32 @@ in {
host = "mail.b12f.io"; host = "mail.b12f.io";
} }
{ {
address = "benjamin.baedorf@rwth-aachen.de"; address = mkEmailAddress "benjamin.baedorf" "rwth-aachen.de";
host = "mail.rwth-aachen.de"; host = "mail.rwth-aachen.de";
config.userName = "bb564306@rwth-aachen.de"; config.userName = mkEmailAddress "bb564306" "rwth-aachen.de";
} }
{ {
address = "byb@miom.space"; address = mkEmailAddress "byb" "miom.space";
host = "mail.hosting.de"; host = "mail.hosting.de";
} }
{ {
address = "admins@pub.solar"; address = mkEmailAddress "admins" "pub.solar";
host = "mail.greenbaum.zone"; host = "mail.greenbaum.zone";
} }
{ {
address = "crew@pub.solar"; address = mkEmailAddress "crew" "pub.solar";
host = "mail.greenbaum.zone"; host = "mail.greenbaum.zone";
} }
# {
# address = mkEmailAddress "benjamin.yule.baedorf" "verkstedt.com";
# flavor = "gmail";
# config = {
# smtp.host = "smtp.gmail.com";
# imap.host = "imap.gmail.com";
# };
# }
{ {
address = "benjamin.yule.baedorf@verkstedt.com"; address = mkEmailAddress "benjamin-yule.baedorf" "ext.ehealthexperts.de";
flavor = "gmail";
config = {
smtp.host = "smtp.gmail.com";
imap.host = "imap.gmail.com";
};
}
{
address = "benjamin-yule.baedorf@ext.ehealthexperts.de";
config = { config = {
smtp.host = "smtp.mailbox.org"; smtp.host = "smtp.mailbox.org";
imap.host = "imap.mailbox.org"; imap.host = "imap.mailbox.org";