upgrade postfix failure with error returned status 75

Asked by tom85

tomcp@tomcp-Precision-5520:~$ sudo apt-get install postfix
[sudo] password for tomcp:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
postfix is already the newest version (3.5.6-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up postfix (3.5.6-1) ...
setting myhostname=tomcp-Precision-5520.. in /etc/postfix

Postfix (main.cf) is now set up with the changes above. 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 'systemctl reload postfix'.

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: tomcp-Precision-5520..
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: tomcp-Precision-5520..
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 75
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Do you have a cartridge return on the end of your hostname. I suspect this is missing and throwing out the update. If you open /etc/hosts with a text editor, then scroll to the end of the last line and press ENTER then save the new file it may help

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

"bad parameter value: tomcp-Precision-5520.."

There seems to be an extra dot after the hostname

What is the output of

uname -a
hostname
cat /etc/hosts

Can you help with this problem?

Provide an answer of your own, or ask tom85 for more information if necessary.

To post a message you must log in.