postfix: use relative symlinks for mailq and newaliases

+19 -1
+6 -1
pkgs/servers/mail/postfix/3.0.nix
··· 35 35 ++ lib.optional withMySQL libmysql 36 36 ++ lib.optional withSQLite sqlite; 37 37 38 - patches = [ ./postfix-script-shell.patch ./postfix-3.0-no-warnings.patch ./post-install-script.patch ]; 38 + patches = [ 39 + ./postfix-script-shell.patch 40 + ./postfix-3.0-no-warnings.patch 41 + ./post-install-script.patch 42 + ./relative-symlinks.patch 43 + ]; 39 44 40 45 preBuild = '' 41 46 sed -e '/^PATH=/d' -i postfix-install
+13
pkgs/servers/mail/postfix/relative-symlinks.patch
··· 1 + diff --git a/postfix-install b/postfix/postfix-install 2 + index 1662c3d..0f20ec0 100644 3 + --- a/postfix-install 4 + +++ b/postfix-install 5 + @@ -336,7 +336,7 @@ compare_or_symlink() { 6 + # 2) we cannot use mv to replace a symlink-to-directory; 7 + # 3) "ln -n" is not in POSIX, therefore it's not portable. 8 + # rm+ln is less atomic but this affects compatibility symlinks only. 9 + - rm -f $2 && ln -sf $link $2 || exit 1 10 + + rm -f $2 && ln -rsf $link $2 || exit 1 11 + } 12 + } 13 +