feat(server/mail): adding mail configuration for enium mailing

- working but not with my current configuration...
- have to see how to fix the issues with the freebox (not allowed to
touch the port 25)
This commit is contained in:
Raphael 2025-08-24 18:36:19 +02:00
parent 78ef729197
commit 4d38f03718
4 changed files with 55 additions and 1 deletions

View file

@ -4,6 +4,9 @@ let
htop = import ./self_host/htop.nix {
inherit inputs config pkgs lib;
};
mail = import ./self_host/mail.nix {
inherit inputs config pkgs lib;
};
monitor = import ./self_host/monitor.nix {
inherit inputs config pkgs lib;
};
@ -21,6 +24,7 @@ in
{
imports = [
nextcloud
mail
htop
ollama
teamspeak
@ -48,6 +52,11 @@ in
default = false;
description = "Enable the ollama";
};
mail = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the mail";
};
monitor = lib.mkOption {
type = lib.types.bool;
default = false;

View file

@ -0,0 +1,42 @@
{ config, pkgs, lib, ... }:
let
cfg = config.service.selfhost.mail;
in
{
config = lib.mkIf cfg {
services.rspamd.enable = true;
mailserver = {
enable = true;
stateVersion = 3;
fqdn = "mail.enium.eu";
domains = [
"enium.eu"
];
loginAccounts = {
"no-reply@enium.eu" = {
hashedPasswordFile = "/root/mail-passwd.txt";
};
};
certificateScheme = "acme-nginx";
};
services = {
roundcube = {
enable = true;
hostName = "mail.enium.eu";
extraConfig = ''
$config['smtp_host'] = "tls://mail.enium.eu";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
'';
};
nginx = {
virtualHosts."mail.enium.eu" = {
forceSSL = true;
enableACME = true;
};
};
};
};
}