On Thu 28 Apr 2022 at 15:52:00 (+0100), Brian wrote:
> On Wed 27 Apr 2022 at 14:57:19 -0500, David Wright wrote:

> > The lines which principally concern you/your system are:
> > 
> > 1) The EHLO line, which you typically don't see, is read from
> > /etc/mailname by exim, is set to lenin.histomat.net, and works.
> > You set it early in the debian-installer, if Devuan follows
> > along the same path. You confirmed it immediately after you
> > told exim "mail sent by smarthost; … … ", on the next screen
> > (again, if Devuan follows).
> 
> The EHLO is typically seen in the first Received: header. In your
> case it is axis.corp. It is not obtained from /etc/mailname by exim.
> 
> I would guess you have a line in /etc/hosts like this:
> 
>   127.0.1.1       axis.corp    HOSTNAME
> 
> A suitablely configured exim gets the EHLO from this line. To test,
> use
> 
>     127.0.1.1     test.axis.corp      HOSTNAME
> 
> and send a mail.
> 
> I would suggest
> 
>  
> https://wiki.debian.org/PkgExim4UserFAQ#How_does_exim_find_out_its_host_name_to_use_in_HELO.2FEHLO.3F
> 
> as a reasonable source of information.

I haven't yet tried actually prefixing another component, but I did
make some changes (acer is the test subject, axis is the smarthost).
Did you mean:
127.0.1.1 test.acer.corp test   or   127.0.1.1 test.acer.corp acer ?

I'm a bit mystified at the moment, so here's what I did. I edited
mailname and hosts, adding the "1"s, reconfigured exim (making no
changes to the dialog boxes), and rebooted.

$ cat /etc/mailname 
acer.corp1
$ cat /etc/hosts 
127.0.0.1       localhost
127.0.1.1       acer1.corp      acer1
192.168.1.14    axis.corp       axis

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
$ hostname
acer
$ domainname
(none)
$ dnsdomainname
dnsdomainname: Name or service not known
$ mail.mailutils -s acer1.corp1 auser@axis
Cc: 
acer1 in hosts, corp1 in mailname
 
$ 

and here's the email on axis:

>From au...@acer.corp Thu Apr 28 11:37:06 2022
Return-path: <au...@acer.corp>
Envelope-to: auser@axis
Delivery-date: Thu, 28 Apr 2022 11:37:06 -0500
Received: from [192.168.1.10] (helo=acer)
        by axis.corp with esmtp (Exim 4.92)
        (envelope-from <au...@acer.corp>)
        id 1nk78c-0001yL-Bm
        for auser@axis; Thu, 28 Apr 2022 11:37:06 -0500
Received: from auser by acer with local (Exim 4.94.2)
        (envelope-from <auser@acer>)
        id 1nk78b-0000HX-6v
        for auser@axis; Thu, 28 Apr 2022 11:37:05 -0500
Subject: acer1.corp1
To: auser@axis
X-Mailer: mail (GNU Mailutils 3.10)
Message-Id: <E1nk78b-0000HX-6v@acer>
From: me <au...@acer.corp>
Date: Thu, 28 Apr 2022 11:37:05 -0500

acer1 in hosts, corp1 in mailname
^D

and the logs from each:

2022-04-28 11:37:05 1nk78b-0000HX-6v <= auser@acer U=auser P=local S=370
2022-04-28 11:37:06 1nk78b-0000HX-6v => auser@axis R=smarthost 
T=remote_smtp_smarthost H=192.168.1.14 [192.168.1.14] K C="250- 387 byte chunk, 
total 387\\n250 OK id=1nk78c-0001yL-Bm"
2022-04-28 11:37:06 1nk78b-0000HX-6v Completed

2022-04-28 11:37:06 1nk78c-0001yL-Bm <= au...@acer.corp H=(acer) [192.168.1.10] 
P=esmtp K S=559 id=E1nk78b-0000HX-6v@acer
2022-04-28 11:37:06 1nk78c-0001yL-Bm => auser <auser@axis> R=local_user 
T=mail_spool
2022-04-28 11:37:06 1nk78c-0001yL-Bm Completed

So, for the hostname, /etc/hostname (acer, untouched) or DHCP (I'm
not sure if my router would send that, though it does know acer's
name) seems to be winning.

Cheers,
David.

Reply via email to