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
1 changed files with 13 additions and 10 deletions

View File

@ -60,7 +60,12 @@ 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" ];
# Check for certificate before both postfix and dovecot to make sure it
# exists.
services.postfix = {
preStart =
'' ''
# Create mail directory and set permissions # Create mail directory and set permissions
mkdir -p "${mail_dir}" mkdir -p "${mail_dir}"
@ -69,10 +74,8 @@ in
${create_certificate} ${create_certificate}
''; '';
};
# Check for certificate before both postfix and dovecot to make sure it
# exists.
services.postfix.after = ["dovecot2.service"];
services.opendkim = { services.opendkim = {
after = ["dovecot2.service"]; after = ["dovecot2.service"];
preStart = preStart =