Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm configuring postfix on CentOS. When I set

inet_interfaces = all 

mail recieving works. But when I change it to

inet_interfaces = $myhostname, localhost

mail is not recieved. What's wrong here?

share|improve this question

2 Answers 2

myhostname may be set incorrectly

It needs to resolve to the IP address that you need to listen on the internet with. i.e. most likely the primary IP of the machine as shown by ip addr sh

if you do a host $(postconf myhostname) where $myhostname is the value of postconf myhostname then you should see if it resolves correctly. The only exception to this is if the hostname is specified in /etc/hosts. So if the first doesn't resolve correctly, then try `grep $(postconf myhostname) /etc/hosts"

You may have multiple interfaces defined and myhostname is not the right interface to listen on.

share|improve this answer

What is the value of $myhostname? It might not contain a valid value.

Have a look at this page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.