Error message after runnign every apt, apt-get, dpkg command [duplicate]

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.