restructuring; now works with 17.03/17.09-pre

I had to remove some of the features, they need to be slowely added in
again.
This commit is contained in:
Robin Raymond 2017-08-12 11:27:19 +02:00
parent 54e56926d6
commit 60574841c6
7 changed files with 125 additions and 56 deletions

View file

@ -1,5 +1,5 @@
# nixos-mailserver: a simple mail server
# Copyright (C) 2016 Robin Raymond
# Copyright (C) 2016-2017 Robin Raymond
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -14,21 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
{ config, pkgs, vmail_group_name, vmail_user_name, dovecot_maildir, enable_imap,
enable_pop3, ... }:
{ vmail_group_name, vmail_user_name, dovecot_maildir, enable_imap, enable_pop3,
... }:
{
# Set the correct permissions for dovecot vmail folder. See
# <http://wiki2.dovecot.org/SharedMailboxes/Permissions>. We choose
# to use the systemd service to set the folder permissions whenever
# dovecot gets started.
systemd.services.dovecot2.preStart = "chmod 02770 /var/vmail";
services.dovecot2 = {
enable = true;
enableImap = enable_imap; # IMAP
enablePop3 = enable_pop3; # POP3
mailGroup = vmail_group_name;
mailUser = vmail_user_name;
mailLocation = dovecot_maildir; # maildir in format "/${domain}/${user}/"
};
enable = true;
enableImap = enable_imap;
enablePop3 = enable_pop3;
mailGroup = vmail_group_name;
mailUser = vmail_user_name;
mailLocation = dovecot_maildir; # maildir in format "/${domain}/${user}/"
}