On July 26, 2021 8:59:00 AM UTC, Vincent Lefevre <vinc...@vinc17.net> wrote:
>On 2021-07-24 09:29:04 +1000, raf wrote:
>> On Fri, Jul 23, 2021 at 04:13:00PM +0200, Jean-François Bachelet
>> <jfbache...@free.fr> wrote:
>>
>> > Hello ^^)
>> >
>> > I found that error in mail.log, at each start postfix issue that error :
>> >
>> > 'Jul 23 15:36:57 discovery postfix/postfix-script[1170]: warning: symlink
>> > leaves directory: /etc/postfix/./makedefs.out'
>> >
>> > is that warning harmless or not ?
>> >
>> > Jeff
>>
>> I'm pretty sure that that file is put there as part of
>> the debian package (even though it doesn't show up in
>> dpkg-query -L postfix). I had it too.
>
>It is not part of the Debian package, but installed by the
>postfix.postinst script:
>
># we want it out of /etc to not be a conffile, but users might expect it there
># so leave a symlink at the expected place in /etc
>if [ -f "/usr/share/postfix/makedefs.out" ]; then
> if [ ! -e "/etc/postfix/makedefs.out" ]; then
> ln -s /usr/share/postfix/makedefs.out /etc/postfix/makedefs.out
> fi
>fi
>
>If I understand correctly, it is a normal file in postfix
>(it is listed in the postfix 3.6.1 tarball in conf/postfix-files:
>"$meta_directory/makedefs.out:f:root:-:644"), but Debian chose
>to move it into /usr/share/postfix and added a symlink to this
>file. The probable reason is that this file is not a configuration
>file and should not be modified.
>
Close.
The Debian package management system tracks system induced changes in /etc and
notifies users about them during package upgrade. Before I moved the file to
/usr/share/postfix, there were alerts during package upgrade every time if
makedefs.out changed (i.e. every time).
I agree with the warning since permissions in the target directory might be
inappropriate. In this case I've checked it before I put the symlink in place
and it's fine.
There are a limited number of options:
1. Don't install makedefs.out, which means the standard postfix installation is
incomplete (this is what Debian used to do).
2. Put it in /etc, which means the admin gets notified about changes in the
file on package upgrade (which made no one happy).
3. Put it elsewhere and provide a symlink, which means the warning.
4. Put it elsewhere and patch away the warning.
None of those are ideal.
Scott K