Re: [exim] short host name in local_domains

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jeremy Harris
Date:  
À: exim-users
Sujet: Re: [exim] short host name in local_domains
On 06/06/2019 15:07, Marc Haber via Exim-users wrote:
> in Debian, local_domains gets seeded with "@:localhost" plus whatever
> the local administrator has entered to augment the list of
> local_domains.
>
> I am usually entering the short hostname of the host in that list, so
> that my local_domains usually ends up being like "@:localhost:myhost",
> knowing that @ gets expanded to myhost.domain.example by virtue of
> primary_hostname. This allows stupid local apps to send mail to
> localuser@myhost instead of localuser@??? to have
> localuser aliased away in the /etc/aliases file. Without myhost in
> local_domains, Mail to localuser@myhost would not be considered local
> and probably sent away to a smarthost without the virtue of having the
> local alias file consulted.
>
> Am I doing things wrong by adding the short host name to
> local_domains?


If it works, it's hard to call it wrong.

> Why does @ only expand to the FQDN and not to FQDN and
> the short host name?


Someone would be bound to complain, and ask for a way
of making it only one or the other.

> Why is there not q special expansion item
> expanding to the short host name?


Nobody's asked for one?
People regard the FQDN as being more "real" for the host name?

I'm guessing, only.

If you're wanting this for ease of deployment across many systems,
use something like ${extract{1}{.}{$primary_hostname}}

--
Cheers,
Jeremy