2022-04-16 20:17:48 +02:00
|
|
|
Add Roundcube, a webmail
|
2022-11-30 22:30:45 +01:00
|
|
|
========================
|
2021-12-31 13:00:00 +01:00
|
|
|
|
|
|
|
The NixOS module for roundcube nearly works out of the box with SNM. By
|
|
|
|
default, it sets up a nginx virtual host to serve the webmail, other web
|
|
|
|
servers may require more work.
|
|
|
|
|
|
|
|
.. code:: nix
|
|
|
|
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
services.roundcube = {
|
|
|
|
enable = true;
|
|
|
|
# this is the url of the vhost, not necessarily the same as the fqdn of
|
|
|
|
# the mailserver
|
|
|
|
hostName = "webmail.example.com";
|
|
|
|
extraConfig = ''
|
|
|
|
# starttls needed for authentication, so the fqdn required to match
|
|
|
|
# the certificate
|
2024-01-30 07:43:21 +01:00
|
|
|
$config['smtp_host'] = "tls://${config.mailserver.fqdn}";
|
2021-12-31 13:00:00 +01:00
|
|
|
$config['smtp_user'] = "%u";
|
|
|
|
$config['smtp_pass'] = "%p";
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.enable = true;
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
|
|
}
|