Postfix/postfix-script warning symlink leaves directory: /etc/postfix/./makedefs.out
Solution 1:
TLDR: This is just a warning and can be safely ignored.
To answer your questions specifically:
-
Does anyone have any idea what exactly this symlink is doing and who/what is creating it?
The file itself is just build specific information of the postfix on your system.
This symlink is made when when you install postfix, so when you got your package manager to installed postfix it would have created this too.
-
Is it something to worry about?
No, the only reason symlinks that go outside of
/etc/postfix
directory are flagged with a warning is because they could indicate a security issue if you didn't expect it to be there, in this case the symlink is created by Debian's package manager so it's fine. -
How do I get rid of this error message in my postfix check?
You don't, or rather you probably shouldn't bother, it's important to note that this is just a warning, not an error, as long as you know what the warning means you can ignore it, and now you do, so you can.
Solution 2:
What is the cause?
The issue behind this is that (IMHO) the system detects it as a symlink outside the CHROOT. For the warning itself, it is correct! You may safely ignore it, or use the below workaround.
As a workaround, re-create that link as a hard-link instead of symlinking (softlink) that file.
Two Liner:
rm /etc/postfix/makedefs.out
ln /usr/share/postfix/makedefs.out /etc/postfix/makedefs.out
One Liner:
rm /etc/postfix/makedefs.out; ln /usr/share/postfix/makedefs.out /etc/postfix/makedefs.out
Then re-run postfix check
and it will not show that error again.