https://bugs.exim.org/show_bug.cgi?id=3129

            Bug ID: 3129
           Summary: Exim4 won't use /etc/aliases without FQDN in
                    /etc/hostname
           Product: Exim
           Version: 4.96+
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Address Rewriting
          Assignee: unalloca...@exim.org
          Reporter: r...@devcorner.nl
                CC: exim-dev@lists.exim.org

I have been searching high and low, but Exim4 refuses to use /etc/aliases:

> cat /etc/hostname
octopi

> cat /etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
...
root: rob
rob: r...@devcorner.nl

Now, when I run "exim -bt root" I get:

R: smarthost for r...@octopi.devcorner.nl
r...@octopi.devcorner.nl
  router = smarthost, transport = remote_smtp_smarthost
  host smtp.gmail.com [2a00:1450:4025:402::6c] port=587
  host smtp.gmail.com [142.250.27.108]         port=587

I've searched and found all sorts of "solutions" but none of them work until I
ran:

> hostnamectl set-hostname octopi.devcorner.nl


> cat /etc/hostname
octopi.devcorner.nl


> exim -bt root
R: system_aliases for r...@octopi.devcorner.nl
R: system_aliases for r...@octopi.devcorner.nl
R: smarthost for r...@devcorner.nl
r...@devcorner.nl
    <-- r...@octopi.devcorner.nl
    <-- r...@octopi.devcorner.nl
  router = smarthost, transport = remote_smtp_smarthost
  host smtp.gmail.com [2a00:1450:4025:402::6c] port=587
  host smtp.gmail.com [142.250.102.108]        port=587


When I restore the hostname:

hostnamectl set-hostname octopi

> cat /etc/hostname
octopi

> exim -bt root
R: smarthost for r...@octopi.devcorner.nl
r...@octopi.devcorner.nl
  router = smarthost, transport = remote_smtp_smarthost
  host smtp.gmail.com [2a00:1450:4025:401::6c] port=587
  host smtp.gmail.com [142.250.102.109]        port=587

It stops working again.

> exim --version
Exim version 4.96 #2 built 28-Sep-2024 14:49:26
Copyright (c) University of Cambridge, 1995 - 2018
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2022
Berkeley DB: Berkeley DB 5.3.28: (September  9, 2013)
Support for: crypteq iconv() IPv6 GnuTLS TLS_resume move_frozen_messages DANE
DKIM DNSSEC Event I18N OCSP PIPECONNECT PRDR Queue_Ramp SOCKS SRS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz
dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 external plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Configuration file search path is
/etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /var/lib/exim4/config.autogenerated

> uname -a
Linux octopi 6.6.70-v8+ #1837 SMP PREEMPT Fri Jan 10 12:02:51 GMT 2025 aarch64
GNU/Linux

Funny thing is: I have a bunch of other Debian machines (5 or so) that don't
have a FQDN in /etc/hosts that work just fine:

> uname -a
Linux otherhost 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1
(2024-11-01) x86_64 GNU/Linux

> exim --version
Exim version 4.96 #2 built 28-Sep-2024 14:49:26
Copyright (c) University of Cambridge, 1995 - 2018
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2022
Berkeley DB: Berkeley DB 5.3.28: (September  9, 2013)
Support for: crypteq iconv() IPv6 GnuTLS TLS_resume move_frozen_messages DANE
DKIM DNSSEC Event I18N OCSP PIPECONNECT PRDR Queue_Ramp SOCKS SRS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz
dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 external plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Configuration file search path is
/etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /var/lib/exim4/config.autogenerated

I prefer not to use a FQDN in /etc/hostname since I have other software that
daoesn't handle this correctly and adds the domain to /etc/hostname (resulting
in octopi.devcorner.nl.devcorner.nl) and I believe /etc/hostname is _intended_
to only contain an "simple" hostname (though "man hostname" states that a FQDN
shouldn't be a problem - but it is for me).

All hosts (the working and non-working ones) have the following in common:

> cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   XXX.devcorner.nl   XXX

::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


Where "XXX" is their respective hostname. No differences other than that. The
other thing they all have in common is:

> cat /etc/exim4/update-exim4.conf.conf
dc_eximconfig_configtype='satellite'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1'
dc_readhost='XXX.devcorner.nl'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtp.gmail.com::587'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'
disable_ipv6='true'

Where, again, the only difference between hosts is that "XXX" is their
respective hostname.

I've double and triple checked for typo's or other silly mistakes but I can't
figure it out. Even ChatGPT couldn't come up with something I hadn't tried and
kept sending me in circles.

Also maybe relevant, exact same on all hosts:

> cat /etc/resolv.conf
nameserver 127.0.0.53
options edns0 trust-ad
search devcorner.nl

To be clear: I'm not so much asking for support but trying to report my
findings of some 'funny business'. I'll gladly provide more information and all
cooperation.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
##   exim-dev-unsubscr...@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to