Merge branch 'roundcube-doc-plugin-maxsize-fix' into 'master'
docs/roundcube: fix mistakes in the example and add examples for caddy and managesieve See merge request simple-nixos-mailserver/nixos-mailserver!499
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
services.nginx.virtualHosts.${config.services.roundcube.hostName} = {
|
||||||
|
forceSSL = false;
|
||||||
|
enableACME = false;
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "127.0.0.1";
|
||||||
|
port = 8000;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.caddy.virtualHosts."${config.services.roundcube.hostName}".extraConfig = ''
|
||||||
|
reverse_proxy localhost:8000
|
||||||
|
'';
|
||||||
|
}
|
||||||
+12
-4
@@ -10,26 +10,34 @@
|
|||||||
hostName = "webmail.example.com"; # the nginx vhost
|
hostName = "webmail.example.com"; # the nginx vhost
|
||||||
package = pkgs.roundcube.withPlugins (
|
package = pkgs.roundcube.withPlugins (
|
||||||
plugins: with plugins; [
|
plugins: with plugins; [
|
||||||
|
# external plugins to be included
|
||||||
# https://search.nixos.org/packages?query=roundcubePlugins
|
# https://search.nixos.org/packages?query=roundcubePlugins
|
||||||
persistent_login
|
persistent_login
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
# activate plugins
|
||||||
|
plugins = [
|
||||||
|
"persistent_login"
|
||||||
|
"managesieve" # built-in
|
||||||
|
];
|
||||||
dicts = with pkgs.aspellDicts; [
|
dicts = with pkgs.aspellDicts; [
|
||||||
# https://search.nixos.org/packages?query=aspellDicts
|
# https://search.nixos.org/packages?query=aspellDicts
|
||||||
en
|
en
|
||||||
];
|
];
|
||||||
# Account for ~30% size increase due to base64 encoding of attachments
|
maxAttachmentSize = config.mailserver.messageSizeLimit / 1024 / 1024;
|
||||||
# https://github.com/roundcube/roundcubemail/issues/7979
|
|
||||||
maxAttachmentSize = config.mailserver.messageSizeLimit / 1024 / 1024 / 1.37;
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
$config['imap_host'] = "ssl://${config.mailserver.fqdn}";
|
$config['imap_host'] = "ssl://${config.mailserver.fqdn}";
|
||||||
$config['smtp_host'] = "ssl://${config.mailserver.fqdn}";
|
$config['smtp_host'] = "ssl://${config.mailserver.fqdn}";
|
||||||
$config['smtp_user'] = "%u";
|
$config['smtp_user'] = "%u";
|
||||||
$config['smtp_pass'] = "%p";
|
$config['smtp_pass'] = "%p";
|
||||||
|
|
||||||
|
$config['managesieve_host'] = "tls://${config.mailserver.fqdn}";
|
||||||
|
$config['managesieve_port'] = 4190;
|
||||||
|
$config['managesieve_usetls'] = true;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts.${config.services.rounducbe.hostName} = {
|
services.nginx.virtualHosts.${config.services.roundcube.hostName} = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,3 +17,10 @@ Once set up you can login with your login account credentials.
|
|||||||
|
|
||||||
.. literalinclude:: ./roundcube.nix
|
.. literalinclude:: ./roundcube.nix
|
||||||
:language: nix
|
:language: nix
|
||||||
|
|
||||||
|
To use a different reverse proxy, such as Caddy, bind Roundcube's Nginx virtual
|
||||||
|
host to ``127.0.0.1`` on a custom port and disable SSL and ACME, as the reverse
|
||||||
|
proxy will handle those.
|
||||||
|
|
||||||
|
.. literalinclude:: ./roundcube-caddy.nix
|
||||||
|
:language: nix
|
||||||
Reference in New Issue
Block a user