Re: [exim] Use uname() in exim configuration file

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Graeme Fowler
Data:  
Para: Exim-Users
Assunto: Re: [exim] Use uname() in exim configuration file
On 2 Mar 2016, at 17:18, Nicolas Dorfsman <ndo@???> wrote:
>     I’m trying to use a unique configuration file for a couple of exam servers.  So, I try to auto-customize configuration by using uname() result.
>     The best example is to set primary_hostname to `uname()`.woup.net.


From the docs:

----------
primary_hostname    Use: main    Type: string    Default: see below
This specifies the name of the current host. It is used in the default EHLO or HELO command for outgoing SMTP messages (changeable via the helo_data option in the smtp transport), and as the default for qualify_domain. The value is also used by default in some SMTP response messages from an Exim server. This can be changed dynamically by setting smtp_active_hostname.


If primary_hostname is not set, Exim calls uname() to find the host name. If this fails, Exim panics and dies. If the name returned by uname() contains only one component, Exim passes it to gethostbyname() (or getipnodebyname() when available) in order to obtain the fully qualified version. The variable $primary_hostname contains the host name, whether set explicitly by this option, or defaulted.
----------

So, if you leave this unset and then refer to $primary_hostname in sections of your configuration it will pull in from a call uname() and do exactly what you specify.

Regards

Graeme