nixos/postfix: backwards compatibility with /var/postfix

This commit is contained in:
Nikolay Amiantov 2016-01-10 15:33:23 +03:00
parent be2b989842
commit d3a19f1b8e

@ -430,6 +430,11 @@ in
};
preStart = ''
# Backwards compatibility
if [ ! -d /var/lib/postfix ] && [ -d /var/postfix ]; then
mkdir -p /var/lib
mv /var/postfix /var/lib/postfix
fi
mkdir -p /var/lib/postfix/data /var/lib/postfix/queue/{pid,public,maildrop}
chown -R ${user}:${group} /var/lib/postfix