Error during "Running newaliases"

  1. Correct mydomain in /etc/postfix/main.cf.

    04 is not a valid domain name - a valid value is an entry of the tour domain.tld.

  2. Change the value for valid_hostname as well.

    This is only a warning but hostnames are not numeric - use the output of

     hostname --fqdn
    

After that execute:

sudo newaliases
sudo apt-get install -f

mydomain

    The internet domain name of this mail system. The default is to use
    $myhostname minus the first component, or "localdomain" (Postfix 2.3 
    and later). $mydomain is used as a default value for many other
    configuration parameters.

myhostname

    The internet hostname of this mail system. The default is to use the
    fully-qualified domain name (FQDN) from gethostname(), or to use the
    non-FQDN result from gethostname() and append ".$mydomain".$myhostname
    is used as a default value for many other configuration parameters.

Type the following command in the terminal:

$ postconf -d myhostname

Now edit the /etc/postfix/main.cf file by changing the myhostname to the hostname you got by executing the previous command. i.e change:

myhostname = new_hostname

Here, new_hostname is your hostname obtained executing the command $ postconf -d myhostname

After changing the file, save it and run the following commands:

$ /etc/init.d/postfix reload
$ service postfix reload