certificate scheme 2

On the fly create certificates via openssl (Maybe change this to
libressl in the future?). This is probably the best scheme to get
something that simply works. Self signed certificates only pose a
problem when connecting to retrieve the email via imap or pop3.
This commit is contained in:
Robin Raymond 2017-08-13 11:51:07 +02:00
parent be5d8c09d8
commit b68e64ec72
6 changed files with 70 additions and 40 deletions

View file

@ -14,23 +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/>
{ vmail_group_name, vmail_user_name, mail_dir, enable_imap, enable_pop3,
certificate_scheme, cert_file, key_file }:
{ vmail_group_name, vmail_user_name, mail_dir, enable_imap, enable_pop3, cert,
key }:
let
# maildir in format "/${domain}/${user}/"
dovecot_maildir = "maildir:${mail_dir}/%d/%n/";
# cert :: PATH
cert = if certificate_scheme == 1
then cert_file
else "";
# key :: PATH
key = if certificate_scheme == 1
then key_file
else "";
in
{
enable = true;