Failure in Configure postfix pt. 5

214 views
Skip to first unread message

wylis.ho...@gmail.com

unread,
May 17, 2017, 10:27:54 PM5/17/17
to OpenWISP
My server is ubuntu 16.04 and i ran this line

sudo ansible-playbook -i hosts playbook_prod.yml -u wylis -k --ask-sudo-pass

from my laptop (Mac OS X).  What does this error mean?

TASK [Stouts.postfix : Configure postfix pt. 5] ***************************************************************************************
fatal: [10.0.0.44]: FAILED! => {"changed": true, "cmd": ["/usr/sbin/postmap", "/etc/postfix/generic"], "delta": "0:00:01.004583", "end": "2017-05-17 22:23:33.569335", "failed": true, "rc": 1, "start": "2017-05-17 22:23:32.564752", "stderr": "postmap: warning: valid_hostname: numeric hostname: 10.0.0.44\npostmap: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 10.0.0.44", "stderr_lines": ["postmap: warning: valid_hostname: numeric hostname: 10.0.0.44", "postmap: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: 10.0.0.44"], "stdout": "", "stdout_lines": []}

thanks

Federico Capoano

unread,
May 18, 2017, 4:14:26 AM5/18/17
to OpenWISP
The value of the domain name is automatically chosen as the postfix hostname and since you are using an ip address instead of a domain name, postfix complains, so you have to tell postfix to use "localhost" instead of 10.0.0.44, you can do by modifying your playbook so it looks like the following:

- hosts: openwisp2
  become: "{{ become | default('yes') }}"
  roles:
    - openwisp.openwisp2
  vars
:
    postfix_myhostname
: "localhost"

Federico

Federico Capoano

unread,
Aug 8, 2017, 6:53:47 AM8/8/17
to OpenWISP
I've added a warning in the README which should prevent this type of issue from happening again to future users - at least those who will manage to read that sentence.. but I put it in uppercase bold just in case somebody wouldn't notice!

Federico

Federico Capoano

unread,
Aug 8, 2017, 6:54:30 AM8/8/17
to OpenWISP
Reply all
Reply to author
Forward
0 new messages