2019-05-10 23:21:28 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2022-02-21 21:55:38 +01:00
|
|
|
let
|
|
|
|
spamfilter_greenlight_map = pkgs.writeText "spamfilter_greenlight_map.cf" ''
|
|
|
|
# Disable Milters for specific clients
|
|
|
|
2a00:14b0:4200:3000:122::1/128 DISABLE
|
|
|
|
212.12.48.122/32 DISABLE
|
|
|
|
'';
|
|
|
|
in
|
2019-05-10 23:21:28 +02:00
|
|
|
{
|
|
|
|
# Import some configuration as they are too long to be easily readable here
|
|
|
|
imports = [
|
2024-05-20 20:59:26 +02:00
|
|
|
./nixos-mailserver/default.nix
|
2019-05-10 23:21:28 +02:00
|
|
|
];
|
2021-08-12 18:32:28 +02:00
|
|
|
networking.domain = "hamburg.freifunk.net";
|
|
|
|
services.mymailserver = {
|
|
|
|
enable = true;
|
2021-08-23 21:16:52 +02:00
|
|
|
logging = false;
|
2021-08-12 18:39:56 +02:00
|
|
|
adminAddress = "postmaster@mail.hamburg.freifunk.net";
|
2021-08-12 18:32:28 +02:00
|
|
|
mailFQDN = "mail2.hamburg.freifunk.net";
|
|
|
|
};
|
2022-02-21 21:55:38 +01:00
|
|
|
# Special config
|
|
|
|
services.postfix.config = {
|
|
|
|
smtpd_milter_maps = "cidr:${spamfilter_greenlight_map}";
|
|
|
|
};
|
2019-05-10 23:21:28 +02:00
|
|
|
}
|