main.cf should not refer to localhost
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postfix (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
The postfix package distributes a main.cf configuration file that refers to localhost in at least one of the parameter settings. Instead, it should use localhost's IP address (127.0.0.1), because postfix might not be able to resolve "localhost" even though it is defined in /etc/hosts. I had this problem on my server, I gave up figuring out how to solve the problem, and finally edited the config file and the problem went away. I suppose it has something to do with nsswitch.conf, and whether localhost is resolved by the nameserver, etc. etc. But I could not figure out what the problem was.
Nevertheless, it is a bug, since postfix' configuration ought to be independent of the particular setup of a server. Using 127.0.0.1 is bulletproof.
For example:
content_filter = smtp-amavis:
should be:
content_filter = smtp-amavis:
It's not bulletproof on an IPv6 host. I think if you can't resolve localhost you have bigger problems.