Score:0

Error in postfix, and while installing things?

cn flag

I recently upgraded to 21.04 from 20.04. And ever since I did whenever I download something, and install it I get this message:

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: ChromePanther..
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: ChromePanther..
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)

The programs I install usually work fine anyway, but I would like to know what happened. I have tried changing the hostname. I have also looked in postfix main.conf nothing seemed amiss.

The output of grep:

$ grep myhostname /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
myhostname = ChromePanther..
mydestination = $myhostname, ChromePanther, localhost.localdomain, , localhost

After following the advice of the answer I now get this error(Still thankful for all your help):

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: ChromePanther..
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad paramete
r value: ChromePanther..
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error ex
it status 75
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Errors were encountered while processing:
 postfix
sh: 0: getcwd() failed: No such file or directory
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have tried restarting, and I have removed the .. behind the host name. But every time I restart then use postfix I the .. comes back.

Paul avatar
us flag
What is the output of `grep myhostname /etc/postfix/main.cf`?
Paul avatar
us flag
Please [edit](https://askubuntu.com/posts/1356731/edit) the question with the output.
Paul avatar
us flag
Try changing `myhostname = ChromePanther` so there are no `..` and then `sudo service postfix restart`. Not sure this will fix it, but it is the first thing I would try.
Paul avatar
us flag
Why does it still report `misplaced delimiter: ChromePanther..` and `myhostname: bad parameter value: ChromePanther..`? Try rebooting.
waltinator avatar
it flag
Check RFC952 (Host Naming Standard) `https://datatracker.ietf.org/doc/html/rfc952`. Periods in hostnames have a special purpose. Your trailing "`..`" is invalid.
Astoshan Stuerm avatar
cn flag
It goes back to .. automatically, and in the actual hostname file there is no ".."
Score:1
vn flag

You have an invalid entry in your /etc/postfix/main.cf file under myhostname, and the package configuration seems invalid too.

First stop the postfix service, then reconfigure postfix with this command:

sudo dpkg-reconfigure postfix

Now enter a valid hostname when you're prompted for it, and you should be good to go when postfix start up again.

If postfix is not correctly installed, you might need to run sudo apt --fix-broken install first. Alternatively, remove postfix and do a complete reinstall with the correct hostname setting.

The installation and configuration for postfix is documented in great detail in the official Ubuntu Server Guide.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.