docs: update Roundcube guide
Adds a short explanation what roundcube even is. Extract and extend the roundcube example showing plugin and spellchecking support. We also inherit a plausible maximum attachment size based on Postfix's message_size_limit. The nginx vhost forces TLS and manages certificates using the ACME integration.
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
Add Roundcube, a webmail
|
|
||||||
========================
|
|
||||||
|
|
||||||
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 = ''
|
|
||||||
$config['imap_host'] = "ssl://${config.mailserver.fqdn}";
|
|
||||||
$config['smtp_host'] = "ssl://${config.mailserver.fqdn}";
|
|
||||||
$config['smtp_user'] = "%u";
|
|
||||||
$config['smtp_pass'] = "%p";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.enable = true;
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
}
|
|
||||||
+1
-1
@@ -35,7 +35,7 @@ Welcome to NixOS Mailserver's documentation!
|
|||||||
|
|
||||||
backup-guide
|
backup-guide
|
||||||
radicale
|
radicale
|
||||||
add-roundcube
|
roundcube
|
||||||
rspamd-tuning
|
rspamd-tuning
|
||||||
flakes
|
flakes
|
||||||
autodiscovery
|
autodiscovery
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.roundcube = {
|
||||||
|
enable = true;
|
||||||
|
hostName = "webmail.example.com"; # the nginx vhost
|
||||||
|
package = pkgs.roundcube.withPlugins (
|
||||||
|
plugins: with plugins; [
|
||||||
|
# https://search.nixos.org/packages?query=roundcubePlugins
|
||||||
|
persistent_login
|
||||||
|
]
|
||||||
|
);
|
||||||
|
dicts = with pkgs.aspellDicts; [
|
||||||
|
# https://search.nixos.org/packages?query=aspellDicts
|
||||||
|
en
|
||||||
|
];
|
||||||
|
# Account for ~30% size increase due to base64 encoding of attachments
|
||||||
|
# https://github.com/roundcube/roundcubemail/issues/7979
|
||||||
|
maxAttachmentSize = config.mailserver.messageSizeLimit / 1024 / 1024 / 1.37;
|
||||||
|
extraConfig = ''
|
||||||
|
$config['imap_host'] = "ssl://${config.mailserver.fqdn}";
|
||||||
|
$config['smtp_host'] = "ssl://${config.mailserver.fqdn}";
|
||||||
|
$config['smtp_user'] = "%u";
|
||||||
|
$config['smtp_pass'] = "%p";
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts.${config.services.rounducbe.hostName} = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
Roundcube
|
||||||
|
=========
|
||||||
|
|
||||||
|
Roundcube is a browser-based open-source webmail client that provides a
|
||||||
|
full-featured email interface with support for IMAP, SMTP, address books, and
|
||||||
|
extensible plugins.
|
||||||
|
|
||||||
|
Code
|
||||||
|
^^^^
|
||||||
|
|
||||||
|
The NixOS module for Roundcube integrates almost immediately with NixOS
|
||||||
|
mailserver, automatically configuring an Nginx virtual host and ACME-managed
|
||||||
|
TLS for secure webmail access; using other web servers may require additional
|
||||||
|
manual setup.
|
||||||
|
|
||||||
|
Once set up you can login with your login account credentials.
|
||||||
|
|
||||||
|
.. literalinclude:: ./roundcube.nix
|
||||||
|
:language: nix
|
||||||
Reference in New Issue
Block a user