mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-28 20:10:34 +05:00
make dovecot wait for postfix instead of other way around
This commit is contained in:
parent
dbd8b88aca
commit
d05bd24040
@ -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 =
|
||||||
|
Loading…
Reference in New Issue
Block a user