How can I configure myhostname to work with Postfix?
- by John Kelly Ferguson
I'm going through the process of setting up a Discourse forum on my server (Ubuntu 12.04 x64) and am getting stuck at the point where I have to configure mailers.
I'm following Discourse's instructions and am stuck trying to configure postfix for Mandrill. It is says to check my fully-qualified domain name by typing hostname -f
When I enter in hostname -f, I get localhost. As far as I know, entering in hostname -f should return mydomainname.com.
When I just enter in hostname, I get mydomainname which is correct because that is what I set my hostname to in /etc/hostname.
Looking at some of my other settings, my /etc/hosts file reads:
127.0.0.1 localhost mydomainname
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
And in my /etc/postfix/main.cf file, I have myhostname set like this:
myhostname = mydomainname.mydomainname.com
(Should this be myhostname = mail.mydomainname.com instead?)
And mydestination is the following:
mydestination = mydomainname.com, localhost, localhost.localdomain, localhost
I'm not that familiar with configuring hostnames. I've been reading Postfix's instructions, but haven't been able to figure it out yet.
Any help on how to get this to work would be greatly appreciated. Thanks.