# This mail server is meant to be LOCAL/INTERNAL ONLY! # It is woefully insecure, but the plan is to be used only between devices # on my home network, so its ok. # # Configuring internal mail clients: # INCOMING SERVER # Protocol : IMAP # Hostname : mail.int # Port : 143 # Connection security : None # Authentication method: Normal Password # Username : NAME@mail.int # OUTGOING SERVER (SMTP) # Hostname : mail.int # Port : 587 # Connection security : None # Authentication method: Normal Password # Username : NAME@mail.int { pkgs, config, ... }: let inherit (config.srv) tld; mailDomain = "mail." + tld; in { srv.slds = [ "mail" ]; services.maddy = { localDomains = [ mailDomain ]; ensureAccounts = [ "john@${mailDomain}" "yorgus@${mailDomain}" ]; ensureCredentials = { # Do not use this in production. This will make passwords world-readable # in the Nix store "john@${mailDomain}".passwordFile = "${pkgs.writeText "postmaster" "john"}"; "yorgus@${mailDomain}".passwordFile = "${pkgs.writeText "postmaster" "yorgus"}"; }; }; }