add mail servers

This commit is contained in:
Ingolf Wagner 2021-09-10 21:34:42 +02:00
parent 6c85f0663f
commit c7d8366f6f
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 53 additions and 4 deletions

View file

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let
unstable = import <nixpkgs-unstable> { };
nextcloudSync = folder:
pkgs.writers.writeBashBin "nextcloud-sync-${folder}" ''
${pkgs.nextcloud-client}/bin/nextcloudcmd \

View file

@ -16,6 +16,7 @@ let
"from:getdigital.de"
"from:getpocket.com"
"from:ghostinspector.com"
"from:globetrotter.de"
"from:hackster.io"
"from:hostelworld.com"
"from:immobilienscout24.de"
@ -387,6 +388,7 @@ let
((lib.imap0 junk_template junk_filter) ++ (lib.imap0 template filters)));
notmuchTaggingNew = let
template = index:
{ tags, query, message ? "generic", ... }:
let
@ -399,8 +401,15 @@ let
echo '${command}'
${command}
'';
in pkgs.writers.writeBash "notmuch-tagging-new"
(lib.concatStringsSep "\n" (lib.imap0 template filters));
junk_template = index: query:
template index {
tags = [ "+junk" "-unread" "-inbox" ];
query = query;
message = "generic junk filter";
};
in pkgs.writers.writeBash "notmuch-tagging-new" (lib.concatStringsSep "\n"
((lib.imap0 junk_template junk_filter) ++ (lib.imap0 template filters)));
in {
@ -418,6 +427,11 @@ in {
# configure passwords
krops.userKeys = {
"namecheap.terranix.org" = {
user = config.users.users.mailUser.name;
source = toString <secrets/mail/namecheap/terranix.org>;
requiredBy = [ "fetchmail.service" ];
};
"gmail.palipalo9" = {
user = config.users.users.mailUser.name;
source = toString <secrets/mail/gmail/palipalo9>;
@ -584,6 +598,25 @@ in {
};
notmuch.enable = true;
};
terranix_org = {
# for google accounts you have to allow 'less secure apps' in accounts.google.com
primary = true;
address = "palo@terranix.org";
aliases = [ ];
realName = "Ingolf Wagner";
userName = "palo@terranix.org";
passwordCommand =
"cat ${toString config.krops.userKeys."namecheap.terranix.org".target}";
imap = {
host = "mail.privateemail.com";
port = 993;
};
mbsync = {
enable = true;
create = "both";
};
notmuch.enable = true;
};
ingolf-wagner-de = {
primary = false;
address = "contact@ingolf-wagner.de";

View file

@ -66,6 +66,23 @@ in {
# tls.fingerprint = "3F:B7:F9:7A:AC:9C:D7:C4:2E:8A:C1:F9:90:B5:D7:D1:8E:E2:F7:7D:9D:DB:FA:01:55:27:D2:79:5F:F8:C1:64";
};
};
terranix_org = {
primary = false;
address = "palo@terranix.org";
aliases = [ ];
realName = "Ingolf Wagner";
userName = "palo@terranix.org";
passwordCommand = passcmd "mail/namecheap/palo@terranix.org";
smtp = {
host = "mail.privateemail.com";
port = 465;
};
notmuch.enable = true;
msmtp = {
enable = true;
# msmtp --serverinfo --tls --tls-certcheck=off -a gmail
};
};
gmail = {
# for google accounts you have to allow 'less secure apps' in accounts.google.com
primary = true;
@ -82,8 +99,6 @@ in {
msmtp = {
enable = true;
# msmtp --serverinfo --tls --tls-certcheck=off -a gmail
# tls.fingerprint = "77:2F:E1:F0:1C:9C:00:45:36:D5:0B:25:17:76:AC:7F:0E:79:68:27:8C:E9:E1:F6:BD:DF:F1:6F:1E:8C:85:18";
# tls.fingerprint = "3F:B7:F9:7A:AC:9C:D7:C4:2E:8A:C1:F9:90:B5:D7:D1:8E:E2:F7:7D:9D:DB:FA:01:55:27:D2:79:5F:F8:C1:64";
};
gpg = {
encryptByDefault = true;