Postfix/Network config out of the box - was: Re: Please participate in the Ubuntu Popularity Contest !

Scott Kitterman ubuntu at kitterman.com
Mon Jul 17 11:39:45 UTC 2006


On Sunday 16 July 2006 19:14, Christofer C. Bell wrote:
> On Sun, 16 Jul 2006 14:01 -0700, Scott Kitterman <ubuntu at kitterman.com> 
wrote:
> > I'm not sure which Ubuntu version you are using, but I've built two
> > Postfix servers recently using the Ubuntu Dapper server install and I
> > don't recall having to edit those files.  I don't have access to SSH
> > where I am now, but I'll look at those files tomorrow when I do.
>
> I'm using a stock installation of Ubuntu 6.06 Desktop.  When I install
> mutt, it installs postfix as a dependancy.  Using the HELO command
> immediately afterwards tells me that postfix is returning 'localhost'
> improperly.
>
> I didn't notice the issue until I started getting bounces from
> linuxcounter.org that my machine was in the CBL blacklist for being
> out of compliance with RFCs (I run machine-update from
> linuxcounter.org out of cron).  The instructions I gave were those on
> the CBL website, and may not be appropriate for folks for whom the
> system works out of the box.
>
> What does perturb me about Ubuntu's behavior is that the Networking
> control panel will silently add either your hostname (if your system
> has not been altered after installation) or your FQDN (if you've
> gotten your hostname set properly) to the 127.0.0.1 entry.  If you
> delete it inside the control panel, it will be there when you exit.
> If you manually edit /etc/hosts, then use the control panel again, it
> will be reinserted there.  I'd consider this behavior (which I am sure
> is a 'feature') a bug.
>
> Since my system was being blacklisted as configured out of the box, I
> can't explain the discrepancy in our experiences.
>
First, I installed the server version of Ubuntu, so that may be part of the 
difference, but now that I have access to the config files, here is what I 
found:

You said (and I think this is not correct):
> postfix is not properly configured out of the box because Ubuntu is
> not properly configured out of the box.  You need to make the
> following changes to your system:
>
> * In /etc/hosts:
>
> + Remove the line that references IP address 127.0.1.1.
> + Remove the hostname from the line that references IP address 127.0.0.1.
> + Create a correct entry for your machine with IP address, FQDN, and
> hostname.
>
This is not required.  In my hosts file the IPv4 entries I have are:

127.0.0.1       localhost
70.91.79.101    mailout00

It should be (and defaults to) the name of the box you give during the install 
routine.

> * In /etc/hostname
>
> + Set the name to your FQDN.
>
Here I have:

mailout00

> * In /etc/postfix/main.cf
>
> + Set the variable 'myname' to your FQDN.
>
myname doesn't show up in a default main.cf.  I expect you meant myhostname.  
That is where I find my FQDN:

myhostname = mailout00.controlledmail.com

The other significant main.cf parameter where you find the FQDN 
is /etc/mailname found in the standard main.cf as:

myorigin = /etc/mailname

In my case, mailname contains the FQDN.  That one I may have had to edit 
manually.

So, I don't think that the changes you recommended to the hosts or hostname 
file are necessary.  I don't know that they hurt anything.

In general, most people are not on internet connections that will be suitable 
for using an MTA for general delivery.  I think for most people, if they are 
going to install an MTA, using their ISPs MTA as a relayhost, see:

http://www.postfix.org/postconf.5.html#relayhost

is more suitable.  With that kind setup issues like the CBL, correctly setting 
FQDN, and getting reverse DNS set up aren't a concern.

Scott K




More information about the ubuntu-users mailing list