The file you are missing belongs to postfix:

$ dpkg -S /usr/share/postfix/postinst.functions
postfix: /usr/share/postfix/postinst.functions

and postfix-ldap correctly depends on that:
Depends: libc6 (>= 2.11), libldap-2.4-2 (>= 2.4.7), postfix (= 3.4.5-1ubuntu1)

So something must have messed with your files/dependencies.
Best would be to try
 $ apt install --reinstall postfix
To ensure the files are in place.

Worst case if you can't  do so due to the issue above you might grab the file 
and put it there to resolve the situation.
 $ apt download postfix
 $ dpkg -x postfix_3.4.5-1ubuntu1_amd64.deb  ex
 $ cp ex/usr/share/postfix/postinst.functions 
/usr/share/postfix/postinst.functions

And then run the install --reinstall above.
Then "apt install -f" to clean out the rest.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1872214

Title:
  package postfix-ldap 3.4.5-1ubuntu1 failed to install/upgrade:
  installed postfix-ldap package pre-removal script subprocess returned
  error exit status 127

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1872214/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to