mail2-nixos-config/mailserver.nix

32 lines
851 B
Nix
Raw Normal View History

2019-05-10 23:21:28 +02:00
{ config, pkgs, ... }:
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 = [
#./dovecot.nix
#./postfix.nix
#./postfixadmin.nix
#./roundcube.nix
#./rspamd.nix
2022-01-02 19:51:59 +01:00
(import (import ./nix/sources.nix).nixos-mailserver)
2019-05-10 23:21:28 +02:00
];
networking.domain = "hamburg.freifunk.net";
services.mymailserver = {
enable = true;
logging = false;
adminAddress = "postmaster@mail.hamburg.freifunk.net";
mailFQDN = "mail2.hamburg.freifunk.net";
};
# Special config
services.postfix.config = {
smtpd_milter_maps = "cidr:${spamfilter_greenlight_map}";
};
2019-05-10 23:21:28 +02:00
}