Website of latouche
[home] [Computers and networks] [tips]
Postfix and host lookup
The default way Postfix SMTP client resolves names is by using the DNS. If you want to use the /etc/hosts file, then the parameter smtp_host_lookup is for you. It takes the following parameters:
- dns: the default option, only DNS lookups
- native: use the lookup system of the OS (defined by nsswitch.conf on Linux)
- dns, native: use the native system if no response is find in the DNS
Thus, to use the /etc/hosts file, the following line will do the job:
smtp_host_lookup = native
On a standard linux, it will first look at /etc/hosts and then at the DNS.
Last update: 2008/01/17