Installed postfix package post installation script subprocess returned error exit status 75

When I try install postfix I'm receiving following error: root@myvps:~# apt install postfix Reading package lists... Done Building dependency tree Reading state information... Done The foll...

When I try install postfix I’m receiving following error:

root@myvps:~# apt install postfix
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  postfix-sqlite
Suggested packages:
  postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb sasl2-bin
  dovecot-common resolvconf postfix-cdb ufw postfix-doc
The following NEW packages will be installed:
  postfix postfix-sqlite
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,755 kB of archives.
After this operation, 4,378 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package postfix-sqlite.
(Reading database ... 66632 files and directories currently installed.)
Preparing to unpack .../postfix-sqlite_3.1.8-0+deb9u1_amd64.deb ...
Unpacking postfix-sqlite (3.1.8-0+deb9u1) ...
Selecting previously unselected package postfix.
Preparing to unpack .../postfix_3.1.8-0+deb9u1_amd64.deb ...
Unpacking postfix (3.1.8-0+deb9u1) ...
Processing triggers for systemd (232-25+deb9u2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up postfix-sqlite (3.1.8-0+deb9u1) ...
grep: /etc/postfix/dynamicmaps.cf: No such file or directory
Adding sqlite map entry to /etc/postfix/dynamicmaps.cf
Processing triggers for rsyslog (8.24.0-1) ...
Setting up postfix (3.1.8-0+deb9u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /lib/systemd/system/postfix.service.
Adding group `postdrop' (GID 118) ...
Done.
setting myhostname: myvps
setting alias maps
setting alias database
setting myorigin
setting destinations: $myhostname, example.com, myvps, localhost.localdomain, localhost
setting relayhost: 
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_command
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all

Postfix (main.cf) is now set up with a default configuration.  If you need to 
make changes, edit /etc/postfix/main.cf (and others) as needed.  To view 
Postfix configuration values, see postconf(1).

After modifying main.cf, be sure to run 'service postfix reload'.

Running newaliases
newaliases: fatal: scan_dir_push: open directory /etc/postfix/dynamicmaps.cf.d: Permission denied
dpkg: error processing package postfix (--configure):
 subprocess installed post-installation script returned error exit status 75
Processing triggers for systemd (232-25+deb9u2) ...
Processing triggers for rsyslog (8.24.0-1) ...
Errors were encountered while processing:
 postfix
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Why dpkg fails when I try install postfix?

The output of ls -ld /etc/postfix/dynamicmaps.cf.d:

ls: cannot access '/etc/postfix/dynamicmaps.cf.d': No such file or directory

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

User avatar

Kronstadt1921

Level 2
Level 2
Posts: 68
Joined: Sat Mar 07, 2015 11:29 pm

[Solved] Postfix errors

The last couple of days I’ve been getting Postfix errors when installing/updating packages via the Synaptic Package Manager or via ‘apt’ in the terminal. I have no idea what Postfix does or if I should be concerned about the errors. Everything still seems to work okay but I’m worried that leaving the problem unaddressed will eventually cause trouble.

Today, I updated the kernel via the native LM Update Manager, which reported this error:

E: postfix: subprocess installed post-installation script returned error exit status 75

The terminal gave the following output:

Code: Select all

(Reading database ... 326340 files and directories currently installed.)
Removing linux-headers-4.15.0-13-generic (4.15.0-13.14~16.04.1) ...
Removing linux-headers-4.15.0-13 (4.15.0-13.14~16.04.1) ...
Removing linux-image-extra-4.15.0-13-generic (4.15.0-13.14~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-13-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-24-generic
Found initrd image: /boot/initrd.img-4.15.0-24-generic
Found linux image: /boot/vmlinuz-4.15.0-23-generic
Found initrd image: /boot/initrd.img-4.15.0-23-generic
Found linux image: /boot/vmlinuz-4.15.0-13-generic
Found initrd image: /boot/initrd.img-4.15.0-13-generic
Adding boot menu entry for EFI firmware configuration
done
Purging configuration files for linux-image-extra-4.15.0-13-generic (4.15.0-13.14~16.04.1) ...
Removing linux-image-4.15.0-13-generic (4.15.0-13.14~16.04.1) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
update-initramfs: Deleting /boot/initrd.img-4.15.0-13-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-24-generic
Found initrd image: /boot/initrd.img-4.15.0-24-generic
Found linux image: /boot/vmlinuz-4.15.0-23-generic
Found initrd image: /boot/initrd.img-4.15.0-23-generic
Adding boot menu entry for EFI firmware configuration
done
Purging configuration files for linux-image-4.15.0-13-generic (4.15.0-13.14~16.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.15.0-13-generic /boot/vmlinuz-4.15.0-13-generic
Setting up postfix (3.1.0-3ubuntu0.3) ...

Postfix configuration was not changed.  If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: 2015Gigabyte..actdsltmp
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 2015Gigabyte..actdsltmp
dpkg: error processing package postfix (--configure):
 subprocess installed post-installation script returned error exit status 75
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up postfix (3.1.0-3ubuntu0.3) ...

Postfix configuration was not changed.  If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: 2015Gigabyte..actdsltmp
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 2015Gigabyte..actdsltmp
dpkg: error processing package postfix (--configure):
 subprocess installed post-installation script returned error exit status 75
Processing triggers for libc-bin (2.23-0ubuntu10) ...

How do I fix this Postfix problem? I tried reinstalling it via the Synaptic PM but that didn’t seem to help. Thanks.

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

My system on 28Feb2021:
OS: (64-bit) LM 18.3 & 20.1, Windows 10
CPU: AMD A10-7800 3.5GHz
Mbd: Gigabyte GA-F2A88XM-D3H FM2+
RAM: G.Skill 2x8GB DDR3-1866
SDA: Kingston SV300S3 SSD 120GB
SDB: WD 1003FZEX HDD 1TB
SDC: Samsung 860 EVO SSD 500 GB

User avatar

catweazel

Level 19
Level 19
Posts: 9764
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Postfix errors

Post

by catweazel » Tue Jul 03, 2018 12:12 am

Kronstadt1921 wrote: ↑

Mon Jul 02, 2018 11:24 pm


How do I fix this Postfix problem? I tried reinstalling it via the Synaptic PM but that didn’t seem to help. Thanks.

newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 2015Gigabyte..actdsltmp

I’d look there in the named file for the described bad parameter.

«There is, ultimately, only one truth — cogito, ergo sum — everything else is an assumption.» — Me, my swansong.

User avatar

Kronstadt1921

Level 2
Level 2
Posts: 68
Joined: Sat Mar 07, 2015 11:29 pm

Re: Postfix errors

Post

by Kronstadt1921 » Tue Jul 03, 2018 9:11 pm

Thanks for your reply, catweazel.

According to the «hostname» terminal command my hostname is «2015Gigabyte». After making sure I had a recent Timeshift file I edited /etc/postfix/main.cf as superuser changing:

myhostname = 2015Gigabyte..actdsltmp

to

myhostname = 2015Gigabyte.

I saved the file and rebooted and then ran two level 2 updates. I got the same postfix error as before and when I checked /etc/postfix/main.cf it was changed back to what it was before I edited the file.

I’ve repeated the above without running the LM Update Manager and can confirm that my edit to /etc/postfix/main.cf survived a restart. It seems to be getting changed when I run the Update Manager.

My system on 28Feb2021:
OS: (64-bit) LM 18.3 & 20.1, Windows 10
CPU: AMD A10-7800 3.5GHz
Mbd: Gigabyte GA-F2A88XM-D3H FM2+
RAM: G.Skill 2x8GB DDR3-1866
SDA: Kingston SV300S3 SSD 120GB
SDB: WD 1003FZEX HDD 1TB
SDC: Samsung 860 EVO SSD 500 GB

User avatar

Kronstadt1921

Level 2
Level 2
Posts: 68
Joined: Sat Mar 07, 2015 11:29 pm

Re: Postfix errors [Solved]

Post

by Kronstadt1921 » Wed Jul 04, 2018 8:05 pm

In the terminal I ran:

$ postconf -d myhostname

which reported «2015Gigabyte.localdomain», a different result than running $ hostname or $ hostname --fqdn, which both report «2015Gigabyte».

I then edited /etc/postfix/main.cf with Nano changing:

myhostname = 2015Gigabyte..actdsltmp

to

myhostname = 2015Gigabyte.localdomain

I then ran $ /etc/init.d/postfix reload. Following that I did an update using LM Update Manager, which indicated the problem is solved.

Last edited by Kronstadt1921 on Wed Jul 04, 2018 8:23 pm, edited 1 time in total.

My system on 28Feb2021:
OS: (64-bit) LM 18.3 & 20.1, Windows 10
CPU: AMD A10-7800 3.5GHz
Mbd: Gigabyte GA-F2A88XM-D3H FM2+
RAM: G.Skill 2x8GB DDR3-1866
SDA: Kingston SV300S3 SSD 120GB
SDB: WD 1003FZEX HDD 1TB
SDC: Samsung 860 EVO SSD 500 GB

User avatar

catweazel

Level 19
Level 19
Posts: 9764
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Postfix errors [Solved]

Post

by catweazel » Wed Jul 04, 2018 8:07 pm

Kronstadt1921 wrote: ↑

Wed Jul 04, 2018 8:05 pm


…which indicated the problem is solved.

It’s easy when you read error messages :)

Well done on getting it sorted.

«There is, ultimately, only one truth — cogito, ergo sum — everything else is an assumption.» — Me, my swansong.

How do I fix this error on Ubuntu 10.04 ?

Reading package lists... Done
Building dependency tree       
Reading state information... Done
postfix is already the newest version.
The following packages were automatically installed and are no longer required:
  libaprutil1-dbd-sqlite3 libcap2 apache2.2-bin libapr1 libaprutil1-ldap libaprutil1 php5-common
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up postfix (2.7.0-1) ...

Postfix configuration was not changed.  If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
newaliases: warning: valid_hostname: numeric hostname: 202002
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 202002
dpkg: error processing postfix (--configure):
 subprocess installed post-installation script returned error exit status 75
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

Even if I reboot, the same error shows up.
Thanks for the help..

asked Feb 26, 2011 at 4:20

kgpdeveloper's user avatar

1

it clearly states the error is in /etc/postfix/main.cf. Open it and fix myhostname value to match hostname command. Then run service postfix reload and check how it is.

answered Feb 26, 2011 at 4:58

grs's user avatar

grsgrs

2,2356 gold badges28 silver badges36 bronze badges

This might be caused by configuring an invalid hostname on first installation. The debconf keeps the values in its database and uses those for future installations also (I guess?), which causes this problems even if you remove or/and purge your postfix.

Try to purge your configuration with following command echo PURGE | debconf-communicate postfix and try apt-get install postfix again.

answered May 20, 2013 at 6:25

Mikael Kundert's user avatar

Понравилась статья? Поделить с друзьями:
  • Installed openmediavault package post installation script subprocess returned error exit status 1
  • Installed libc bin package post installation script subprocess returned error exit status 135
  • Installed libc bin package post installation script subprocess returned error exit status 134
  • Installed javascript common package post installation script subprocess returned error exit status 1
  • Installed initramfs tools package post installation script subprocess returned error exit status 1