ubuntupostfix-mta

How to fix a postfix myhosting config problem?


I tried to install a postfix with a local mail config, but i have a problem with myhostname config

I need complete de install process

Running newaliases newaliases: warning: valid_hostname: misplaced delimiter: yasser..name newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: yasser..name

I expect success install


Solution

  • Updating the /etc/postfix/main.cf fixes this issue. The statements here apply to Ubuntu 20.04.

    The statements below use a different editor and also include before/after statements to confirm & verify you've correctly edited the main.cf:

    # run cat|grep statement below to see what we currently have for the value we need to edit:
    myusername@myusername:~$ cat /etc/postfix/main.cf | grep 'myhostname = '
    myhostname = myusername..
    # edit the /etc/postfix/main.cf file to specify the name attribute for myhostname by running the command below which uses the vi editor:    
    myusername@myusername:~$ sudo vi /etc/postfix/main.cf
    # run cat|grep statement below to confirm the name attribute is now specified in the /etc/postfix/main.cf:
    myusername@myusername:~$ cat /etc/postfix/main.cf | grep 'myhostname = '
    myhostname = myusername.name