2024-01-06 01:19:35 +01:00
|
|
|
# SPDX-FileCopyrightText: 2023 Simon Bruder <simon@sbruder.de>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2023-05-31 13:11:12 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
lib.mkIf config.sbruder.mailserver.enable {
|
|
|
|
# Enable recursor for DNSBLs etc.
|
|
|
|
services.resolved.enable = false;
|
|
|
|
services.unbound = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
interface = [ "127.0.0.53" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
resolveLocalQueries = false; # does not work with .53
|
|
|
|
};
|
|
|
|
networking.resolvconf.extraConfig = ''
|
|
|
|
name_servers='127.0.0.53'
|
|
|
|
'';
|
|
|
|
}
|