[email] add working webmail config
This commit is contained in:
parent
0a1508007a
commit
6ab06dd36a
1 changed files with 27 additions and 9 deletions
|
@ -131,7 +131,7 @@
|
||||||
"${cfg.sub}.${cfg.domain}" = {
|
"${cfg.sub}.${cfg.domain}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = "skynet";
|
useACMEHost = "skynet";
|
||||||
# override teh inbuilt nginx config
|
# override the inbuilt nginx config
|
||||||
enableACME = false;
|
enableACME = false;
|
||||||
serverName = "${cfg.sub}.${cfg.domain}";
|
serverName = "${cfg.sub}.${cfg.domain}";
|
||||||
};
|
};
|
||||||
|
@ -139,19 +139,37 @@
|
||||||
|
|
||||||
#https://nixos-mailserver.readthedocs.io/en/latest/add-roundcube.html
|
#https://nixos-mailserver.readthedocs.io/en/latest/add-roundcube.html
|
||||||
users.groups.nginx = {};
|
users.groups.nginx = {};
|
||||||
|
users.groups.roundcube = {};
|
||||||
services.roundcube = {
|
services.roundcube = {
|
||||||
enable = true;
|
enable = true;
|
||||||
database.username = "roundcube";
|
# this is the url of the vhost, not necessarily the same as the fqdn of
|
||||||
# this is the url of the vhost, not necessarily the same as the fqdn of
|
# the mailserver
|
||||||
# the mailserver
|
hostName = "${cfg.sub}.${cfg.domain}";
|
||||||
hostName = "${cfg.sub}.${cfg.domain}";
|
extraConfig = ''
|
||||||
extraConfig = ''
|
|
||||||
# starttls needed for authentication, so the fqdn required to match
|
# starttls needed for authentication, so the fqdn required to match
|
||||||
# the certificate
|
# the certificate
|
||||||
$config['smtp_server'] = "tls://${cfg.sub}.${cfg.domain}";
|
$config['smtp_server'] = "ssl://${cfg.sub}.${cfg.domain}";
|
||||||
$config['smtp_user'] = "%u";
|
$config['smtp_user'] = "%u";
|
||||||
$config['smtp_pass'] = "%p";
|
$config['smtp_pass'] = "%p";
|
||||||
'';
|
$config['imap_host'] = "ssl://${cfg.sub}.${cfg.domain}";
|
||||||
|
$config['product_name'] = "Skynet Webmail";
|
||||||
|
$config['identities_level'] = 4;
|
||||||
|
$config['login_username_filter'] = "email";
|
||||||
|
$config['ldap_public']['public'] = array(
|
||||||
|
'name' => 'Public LDAP Addressbook',
|
||||||
|
'hosts' => array('sso.skynet.ie'),
|
||||||
|
'port' => 636 ,
|
||||||
|
'user_specific' => false,
|
||||||
|
'base_dn' => 'ou=users,dc=skynet,dc=ie',
|
||||||
|
'filter' => '(skMemberOf=cn=skynet-users-linux,ou=groups,dc=skynet,dc=ie)',
|
||||||
|
'fieldmap' => [
|
||||||
|
// Roundcube => LDAP:limit
|
||||||
|
'name' => 'cn',
|
||||||
|
'surname' => 'sn',
|
||||||
|
'email' => 'skMail:*',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
mailserver = {
|
mailserver = {
|
||||||
|
|
Loading…
Reference in a new issue