Estou usando a versão do Ubuntu 16.04. Eu queria enviar e-mail em php de localhost, mas quando eu instalei agente de transferência de e-mail postfix me deu seguinte erro:
root@home-H81MLV3:/home/home/Downloads# sudo apt-get install libsasl2-modules postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsasl2-modules is already the newest version (2.1.26.dfsg1-14build1).
The following packages were automatically installed and are no longer required:
libgsasl7 libkyotocabinet16v5 libmailutils4 libmysqlclient20 libntlm0
mailutils-common
Use 'sudo apt autoremove' to remove them.
Suggested packages:
procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin
dovecot-common postfix-cdb postfix-doc
The following NEW packages will be installed:
postfix
0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
Need to get 0 B/1,152 kB of archives.
After this operation, 3,697 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package postfix.
(Reading database ... 219325 files and directories currently installed.)
Preparing to unpack .../postfix_3.1.0-3_amd64.deb ...
Unpacking postfix (3.1.0-3) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up postfix (3.1.0-3) ...
Adding group 'postfix' (GID 132) ...
Done.
Adding system user 'postfix' (UID 124) ...
Adding new user 'postfix' (UID 124) with group 'postfix' ...
Not creating home directory '/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding group 'postdrop' (GID 133) ...
Done.
setting myhostname: home-H81MLV3..name
setting alias maps
setting alias database
mailname is not a fully qualified domain name. Not changing /etc/mailname.
setting destinations: $myhostname, http://localhost/project, home-H81MLV3, localhost.localdomain, 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
setting inet_protocols: all
WARNING: /etc/aliases exists, but does not have a root alias.
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
newaliases: warning: valid_hostname: misplaced delimiter: home-H81MLV3..name
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: home-H81MLV3..name
dpkg: error processing package postfix (--configure):
subprocess installed post-installation script returned error exit status 75
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Errors were encountered while processing:
postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
Em algum lugar que eu li que estou reinstalando o postfix, é por isso que está me dando este erro, então eu desinstalei o postfix e o instalei novamente. Está me dando o mesmo código de retorno do dpkg (1).