make dovecot wait for postfix instead of other way around

This commit is contained in:
Robin Raymond 2017-08-23 17:34:34 +02:00
parent dbd8b88aca
commit d05bd24040

View File

@ -60,19 +60,22 @@ in
# <http://wiki2.dovecot.org/SharedMailboxes/Permissions>. We choose # <http://wiki2.dovecot.org/SharedMailboxes/Permissions>. We choose
# to use the systemd service to set the folder permissions whenever # to use the systemd service to set the folder permissions whenever
# dovecot gets started. # dovecot gets started.
services.dovecot2.preStart = services.dovecot2.after = [ "postfix.service" ];
''
# Create mail directory and set permissions
mkdir -p "${mail_dir}"
chgrp "${vmail_group_name}" "${mail_dir}"
chmod 02770 "${mail_dir}"
${create_certificate}
'';
# Check for certificate before both postfix and dovecot to make sure it # Check for certificate before both postfix and dovecot to make sure it
# exists. # exists.
services.postfix.after = ["dovecot2.service"]; services.postfix = {
preStart =
''
# Create mail directory and set permissions
mkdir -p "${mail_dir}"
chgrp "${vmail_group_name}" "${mail_dir}"
chmod 02770 "${mail_dir}"
${create_certificate}
'';
};
services.opendkim = { services.opendkim = {
after = ["dovecot2.service"]; after = ["dovecot2.service"];
preStart = preStart =