I tried to reinstall Postfix, but I get this bunch of errors:
root@***:/etc/init.d# sudo apt-get install -f postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre resolvconf
postfix-cdb mail-reader
The following NEW packages will be installed:
postfix
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/1,389kB of archives.
After this operation, 3,531kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package postfix.
(Reading database ... 56122 files and directories currently installed.)
Unpacking postfix (from .../postfix_2.7.1-1ubuntu0.1_amd64.deb) ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up postfix (2.7.1-1ubuntu0.1) ...
Configuration file `/etc/init.d/postfix'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** postfix (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/init.d/postfix ...
Adding group `postfix' (GID 109) ...
Done.
Adding system user `postfix' (UID 106) ...
Adding new user `postfix' (UID 106) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 115) ...
Done.
setting myhostname: ***.net
setting alias maps
setting alias database
setting myorigin
setting destinations: ***.net, localhost.***.net, , localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
Postfix 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 '/etc/init.d/postfix reload'.
Running newaliases
postalias: fatal: /etc/mailname: cannot open file: Permission denied
dpkg: error processing postfix (--configure):
subprocess installed post-installation script returned error exit status 1
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)
I tried aptitude purge, remove, autoclean and all of dpkg options (configure, remove, purge) but nothing did the trick. /etc/mailname exists (0644 root:root) with as content *.net (fetched from hostname). What am I doing wrong?