15

I trying to get an email server up and running on a raspberry pi running Raspbian Buster.

In my postfix checks I am getting a strange notification about a symlink that I definitely did not create myself. The warning is postfix/postfix-script: warning: symlink leaves directory: /etc/postfix/./makedefs.out I have done two clean installs thinking it might be malicious, and every time it comes back, so I am assuming it is somehow part of the configuration or has something specifically to do wiht the postfix version on raspberry pi.

In any event, the following message appears when running my postfix check:

sudo postfix check
postfix: Postfix is running with backwards-compatible default settings
postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
postfix: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
postfix/postfix-script: warning: symlink leaves directory: /etc/postfix/./makedefs.out
  1. Does anyone have any idea what exactly this symlink is doing and who/what is creating it?
  2. Is it something to worry about and
  3. How do I get rid of this error message in my postfix check?
2
  • 1
    Came here from google since I see the same warning. However, I doubt that this needs "fixing" at all. For me it is a link /etc/postfix/makedefs.out -> /usr/share/postfix/makedefs.out. As a comment in this file states this file documents how Postfix was built for your machine and contains what looks indeed like a config how to build postfix. Not sure for what it is needed, though.
    – sigy
    Apr 22, 2020 at 15:05
  • Yeah, I never figured this one out and ended up ditching the email server. I would go back to it if this was resolved. not much help though.
    – DanRan
    Apr 24, 2020 at 3:49

3 Answers 3

7

TLDR: This is just a warning and can be safely ignored.

To answer your questions specifically:

  1. 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.

  2. 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.

  3. 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.

2
  • 2
    A process cannot 'escape' its chroot via a symlink! If the symlink points to a path outside the chroot (and this path does not happen exists inside the chroot as well, relative to its root) it will behave like a broken symlink. You can either fix it (make a copy or hardlink as suggested, instead of a symlink). Or otherwise you might as well delete the symlink, because most applications cannot distinguish a missing file from a broken symlink anyway. Aug 4, 2021 at 12:03
  • @NilsToedtmann you are correct, apparently I just went ahead and assumed a bunch of stuff when I wrote this, I've updated the answer and dropped the rubbish
    – jamtowers
    Aug 10, 2021 at 11:07
6

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.

1
  • Remind: the Link must be used instead of original files since it would not update the other location as the one, that already been used.
    – djdomi
    Aug 12, 2022 at 7:07
0

This warning is Debian-specific, it is displayed from versions 3.1.4-2 to 3.6.3-4, so this is fixed since Debian 12 bookwoorm and Ubuntu 22.04 LTS Jammy Jellyfish.

This warning is harmless, and the fix done by Debian is only to hide the warning. The file makedefs.out is only a list of the environment used to compile postfix, to help reproducibility.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .