feat : Add mailer in forgejo

This commit is contained in:
Wateir 2025-12-24 20:17:53 +01:00
parent 7506073727
commit efdb1794be
5 changed files with 63 additions and 34 deletions

View file

@ -4,34 +4,32 @@
age.secrets = {
YfDrVBDJcVoYNZeJ = {
file = ../secrets/cache/YfDrVBDJcVoYNZeJ;
owner = "roundcube";
};
LtnxWKwZdDIxAKzp = {
file = ../secrets/cache/LtnxWKwZdDIxAKzp;
owner = "roundcube";
};
};
services.roundcube = {
enable = true;
hostName = "${config.module.roundcube.subdomain}.${config.module.domain}";
plugins = [ "multiple_accounts" ];
configureNginx = false;
extraConfig = ''
$config['default_host'] = trim(
file_get_contents('${config.age.secrets.LtnxWKwZdDIxAKzp.path}')
);
// Concatenate the protocol string with the file contents in PHP
$config['default_host'] = 'ssl://' . trim(file_get_contents('${config.age.secrets.LtnxWKwZdDIxAKzp.path}'));
$config['default_port'] = 993;
$config['smtp_server'] = trim(
file_get_contents('${config.age.secrets.YfDrVBDJcVoYNZeJ.path}')
);
$config['smtp_server'] = 'tls://' . trim(file_get_contents('${config.age.secrets.YfDrVBDJcVoYNZeJ.path}'));
$config['smtp_port'] = 465;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
'';
};
systemd.services.nginx.serviceConfig.ProtectHome = false;
users.groups.roundcube.members = [ "nginx" ];
users.groups.roundcube.members = [ "nginx" "phpfpm" ];
}